sql语句重复 while循环取不出来

owillber 2009-10-26 10:02:31
$sqlthree="SELECT filename,ftitle,one,two,three,four,five,newstime,datetime from table where classid='116' ";
$rthree = mysql_query($sqlthree, $con);

$sqlfive="SELECT filename,ftitle,one,two,three,four,five,newstime,datetime from table where classid='117' ";
$rfive = mysql_query($sqlfive, $con);

<?php
while($rowthree = mysql_fetch_row($rthree))
{
echo "<td class='font-12' align='center' >";
echo "<a href='$rowthree[0].html' style='text-decoration:none;' >$rowthree[1]</a>";
echo "</td>";
echo "<td class='font-12' align='center' >";
echo $rowthree[8];
echo "</td>";
echo "<td class='font-12' align='center' >";
echo $rowthree[2].' '.$rowthree[3].' '.$rowthree[4];
echo "</td>";
echo "<td class='font-12' align='center' >";
echo $rowthree[7];
echo "</td>";
}

?>

<?php
while($rowfive = mysql_fetch_row($rfive))
{
echo "<td class='font-12' align='center' >";
echo "<a href='$rowfive[0].html' style='text-decoration:none;' >$rowfive[1]</a>";
echo "</td>";
echo "<td class='font-12' align='center' >";
echo $rowfive[8];
echo "</td>";
echo "<td class='font-12' align='center' >";
echo $rowfive[2].' '.$rowfive[3].' '.$rowfive[4].' '.$rowfive[5].' '.$rowfive[6];
echo "</td>";
echo "<td class='font-12' align='center' >";
echo $rowfive[7];
echo "</td>";
}

?>

while只循环了 three 数据 five 没有读取到 怎么才能读取到?
...全文
149 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
床上等您 2009-10-26
  • 打赏
  • 举报
回复
shaogu8 2009-10-26
  • 打赏
  • 举报
回复
想不到写得比复杂还复杂了点!
wldzjj 2009-10-26
  • 打赏
  • 举报
回复
我试了你的代码 在我这完全好用,并没有错,你在看看classid =117里面有没有数据

21,891

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧