明明检索出了记录结果,可偏偏为什么记录结果却不显示出来? 我通过输出变量$allcou知道了检索是有结果的呀,可就是记录不显示出来. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 将显示的结果贴出来<table width="100%" border="0" cellspacing="0" cellpadding="0"><?if ($linkdata){ mysql_select_db("test",$db); $onepage=5; $qstr_news="SELECT * FROM news"; $allcou=mysql_num_rows(mysql_query("$qstr_news",$db)); if ($pagestart>$allcou){$page=1;} $pagestart=($page-1)*$onepage; $allpage=ceil($allcou / $onepage); $qstr_news=$qstr_news." ORDER BY news_date DESC,news_id desc LIMIT $pagestart,$onepage"; echo "11111111".$db.'11111111<br>'; //¿´ÕâÒ»¾äµÄ½á¹ûÊÇʲô $result_news = mysql_query("$qstr_news",$db)echo "222222".$db.'2222222222<br>'; //¿´ÕâÒ»¾äµÄ½á¹ûÊÇʲô if (mysql_num_rows($result_news) > 0) { $jishu_news=0; while($myrow_news=mysql_fetch_array($result_news)) { print"ok"; $news_id=$myrow_news["news_id"]; $news_subject=$myrow_news["news_subject"]; $news_content=$myrow_news["news_content"]; $news_date=$myrow_news["news_date"]; ?> <tr> <td class="ak" height="18" width="2%" <? if($jishu_news % 2==0){echo "bgcolor=\"#F6F6F6\"";}?>> </td> <td class="ak" height="18" width="80%" <? if($jishu_news % 2==0){echo "bgcolor=\"#F6F6F6\"";}?>><font color="#990000">£«</font> <a href="shownews.php?news_id=<?echo $news_id;?>" target="<? echo uniqid(rand());?>" class="a06"> <?echo $news_subject;?></a><font color="#990000"> </font> </td> <td class="ak" width="18%" <? if($jishu_news % 2==0){echo "bgcolor=\"#F6F6F6\"";}?>><font color="#990000"><?echo $news_date;?></font></td> </tr> <? $jishu_news++; } } if($jishu_news<$onepage) { for($jishu_news;$jishu_news<$onepage;$jishu_news++) { ?> <tr> <td class="ak" height="18" width="2%" <? if($jishu_news % 2==0){echo "bgcolor=\"#F6F6F6\"";}?>> </td> <td height="18" colspan="2" class="ak" <? if($jishu_news % 2==0){echo "bgcolor=\"#F6F6F6\"";}?>> </td> </tr> <? } } }?> </table> 求一个PHP小i机器人接口 MySQL小问题 一道面试题php读2G文件 用header下载文件,数据没有下载完全?? PHP的弱弱问题。。。 如何用php得到本页的完整url? 图片名称为中文格式 如何配置editplus,在editplus中直接运行php程序? 唠叨大哥进来帮帮忙哈,大家都进来帮帮...急...100分 求apche重定向规则 ______+ 如何生成静态页面??? 真郁闷啊~~~~~~~~~~~
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
if ($linkdata)
{
mysql_select_db("test",$db);
$onepage=5;
$qstr_news="SELECT * FROM news";
$allcou=mysql_num_rows(mysql_query("$qstr_news",$db));
if ($pagestart>$allcou){$page=1;}
$pagestart=($page-1)*$onepage;
$allpage=ceil($allcou / $onepage);
$qstr_news=$qstr_news." ORDER BY news_date DESC,news_id desc LIMIT $pagestart,$onepage";
echo "11111111".$db.'11111111<br>'; //¿´ÕâÒ»¾äµÄ½á¹ûÊÇʲô
$result_news = mysql_query("$qstr_news",$db)
echo "222222".$db.'2222222222<br>'; //¿´ÕâÒ»¾äµÄ½á¹ûÊÇʲô
if (mysql_num_rows($result_news) > 0)
{
$jishu_news=0;
while($myrow_news=mysql_fetch_array($result_news))
{
print"ok"; $news_id=$myrow_news["news_id"];
$news_subject=$myrow_news["news_subject"];
$news_content=$myrow_news["news_content"];
$news_date=$myrow_news["news_date"];
?>
<tr>
<td class="ak" height="18" width="2%" <? if($jishu_news % 2==0){echo "bgcolor=\"#F6F6F6\"";}?>> </td>
<td class="ak" height="18" width="80%" <? if($jishu_news % 2==0){echo "bgcolor=\"#F6F6F6\"";}?>><font color="#990000">£«</font>
<a href="shownews.php?news_id=<?echo $news_id;?>" target="<? echo uniqid(rand());?>" class="a06">
<?echo $news_subject;?></a><font color="#990000">
</font> </td>
<td class="ak" width="18%" <? if($jishu_news % 2==0){echo "bgcolor=\"#F6F6F6\"";}?>><font color="#990000"><?echo $news_date;?></font></td>
</tr>
<?
$jishu_news++;
}
}
if($jishu_news<$onepage)
{
for($jishu_news;$jishu_news<$onepage;$jishu_news++)
{
?>
<tr>
<td class="ak" height="18" width="2%" <? if($jishu_news % 2==0){echo "bgcolor=\"#F6F6F6\"";}?>> </td>
<td height="18" colspan="2" class="ak" <? if($jishu_news % 2==0){echo "bgcolor=\"#F6F6F6\"";}?>> </td>
</tr>
<?
}
}
}?>
</table>