滚动新闻的实现 从数据库中读取最新的十条新闻,实现新闻标题循环滚动,实在写不出来了,高手帮忙 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 读十条,会吧???滚动的,g.cn 上多的是。。是个js+html而己 $query=mysql_query("select note_title from notice by note_date DESC limit 10");$result=mysql_query($sql);//搜索最近的10条的新闻。if(!$qaury){echo "没有通知..";}else{$rows=mysql_num_rows($query);$i=0;while($array=mysql_fetch_rows($query)){ echo "array[$i]"; $i++;}?> $sql="select note_title from notice by note_date DESC limit 10";$result=mysql_query($sql);/************************************/看样子lz不会程序 <!-- 用户最新相册 --><!-- 首页最新照片开始 --><div id="demo" style='text-align:top;overflow:hidden;height:90px;width:250px;'><div id="demo1" valign="top" style="text-align:top;"><a target='_blank' href='/show_photo.php?user=fanyanyiyun&id=100003611'><img src='http://cache44.51.com/photo5/9f/bf/fanyanyiyun/3bdda1b3a34176a9bea744a609e2c8fcs.jpg' border='1' style='height:100px;border-color:#cccccc'></a><br><a target='_blank' href='/show_photo.php?user=fanyanyiyun&id=100003610'><img src='http://cache44.51.com/photo5/9f/bf/fanyanyiyun/7119efa8472564fc342f5bb3b13e15f4s.jpg' border='1' style='height:100px;border-color:#cccccc'></a><br><a target='_blank' href='/show_photo.php?user=fanyanyiyun&id=100003608'><img src='http://cache44.51.com/photo5/9f/bf/fanyanyiyun/633ff5d5e05a339078d854fb1a0b5752s.jpg' border='1' style='height:100px;border-color:#cccccc'></a></div><div id="demo2" valign="top" style="text-align:top;"></div></div><!-- 首页最新照片结束 --><script> var speed=30 demo2.innerHTML=demo1.innerHTML; function Marquee(){ if(demo2.offsetHeight-demo.scrollTop<=0) demo.scrollTop -= demo1.offsetHeight; else{ demo.scrollTop++; } } var MyMar=setInterval(Marquee,speed); demo.onmouseover=function() {clearInterval(MyMar);} demo.onmouseout=function() {MyMar=setInterval(Marquee,speed);}</script> $res=mysql_query("select note_title from notice order by note_date DESC limit 10");while($row=mysql_fetch_assoc($res)) echo $row['note_title']; $query=mysql_query("select note_title from `notice` by note_date DESC limit 10");//搜索最近的10条的新闻。if(!$query){echo "没有通知..";}else{$i=0;while($array=mysql_fetch_rows($query)){ echo $array[$i]; $i++;} 是order by 如果!$query发生了,是查询出错了查出了0条结果,也算查询成功mysql_num_rows()为0才算是没有通知 ifarme跳转浏览器兼容问题 ? 关于表单的问题不知道哪里出错 判断两个数组中是否有相同值? 关于PHP使用数据库问题 php Netscape7.2支持的问题!! 搞不懂!为什么这个语句会错!请看: 如何获得上网时, 上网的IP? (不是"remote_addr", 也不是"server_addr") 根据数据库的内容,让分隔线移动 scope参数错误或没有scope权限解决方法 请问配置mysql的问题!报错:无法载入 mysql 扩展 请教:关于数据库支持中文的问题
$result=mysql_query($sql);
//搜索最近的10条的新闻。
if(!$qaury){
echo "没有通知..";
}
else
{
$rows=mysql_num_rows($query);
$i=0;
while($array=mysql_fetch_rows($query))
{ echo "array[$i]";
$i++;
}
?>
$result=mysql_query($sql);
/************************************/
看样子lz不会程序
<!-- 首页最新照片开始 -->
<div id="demo" style='text-align:top;overflow:hidden;height:90px;width:250px;'>
<div id="demo1" valign="top" style="text-align:top;">
<a target='_blank' href='/show_photo.php?user=fanyanyiyun&id=100003611'><img src='http://cache44.51.com/photo5/9f/bf/fanyanyiyun/3bdda1b3a34176a9bea744a609e2c8fcs.jpg' border='1' style='height:100px;border-color:#cccccc'></a><br><a target='_blank' href='/show_photo.php?user=fanyanyiyun&id=100003610'><img src='http://cache44.51.com/photo5/9f/bf/fanyanyiyun/7119efa8472564fc342f5bb3b13e15f4s.jpg' border='1' style='height:100px;border-color:#cccccc'></a><br><a target='_blank' href='/show_photo.php?user=fanyanyiyun&id=100003608'><img src='http://cache44.51.com/photo5/9f/bf/fanyanyiyun/633ff5d5e05a339078d854fb1a0b5752s.jpg' border='1' style='height:100px;border-color:#cccccc'></a>
</div>
<div id="demo2" valign="top" style="text-align:top;"></div>
</div>
<!-- 首页最新照片结束 --><script>
var speed=30
demo2.innerHTML=demo1.innerHTML;
function Marquee(){
if(demo2.offsetHeight-demo.scrollTop<=0)
demo.scrollTop -= demo1.offsetHeight;
else{
demo.scrollTop++;
}
}
var MyMar=setInterval(Marquee,speed);
demo.onmouseover=function() {clearInterval(MyMar);}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed);}
</script>
$res=mysql_query("select note_title from notice order by note_date DESC limit 10");
while($row=mysql_fetch_assoc($res))
echo $row['note_title'];
//搜索最近的10条的新闻。
if(!$query){
echo "没有通知..";
}
else
{
$i=0;
while($array=mysql_fetch_rows($query))
{ echo $array[$i];
$i++;
}
如果!$query发生了,是查询出错了
查出了0条结果,也算查询成功
mysql_num_rows()为0才算是没有通知