滚动新闻的实现 从数据库中读取最新的十条新闻,实现新闻标题循环滚动,实在写不出来了,高手帮忙 解决方案 » 免费领取超大流量手机卡,每月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才算是没有通知 想开发一个门户,不知道用什么适合?能二次开发的,求高手指点。 关于ajax无刷新分页遇到的问题,忘大侠指点!! 如何解决下述两个问题! 错误:undefined function include() 问个问题,没有开放读文件权限,可以做中转吗? PHP事务的如何写? 下载源码,疑似遇到添加管理员语句,新手,请指点。 查询表中行数的问题 关于php 生成数据统计图表的问题! 请问那里有PHP高级编程电子版下载? 请问配置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才算是没有通知