<?php
require("/var/www/betacom/Comment.php");
$comment=new Comment();
$result=$comment->viewcontent();//viewcontent()函数返回执行查询语句的数组
echo "<table>\n";
echo "<tr>\n";
while($row=fetch_row($result))
{
echo '<td bgcolor="#00FF00">';
echo "$row[1]";
echo '</td>'; echo '<td bgcolor="#00FF00">';
echo "$row[2]";
echo '</td>'; echo '<td bgcolor="#00FF00">';
echo "$row[3]";
echo '</td>';
}
echo "</tr>\n";
echo "</table>\n";
?> 运行的时候错误提示如下:
Call to undefined function fetch_row() in /var/www/betacom/showlist.php on line 23
require("/var/www/betacom/Comment.php");
$comment=new Comment();
$result=$comment->viewcontent();//viewcontent()函数返回执行查询语句的数组
echo "<table>\n";
echo "<tr>\n";
while($row=fetch_row($result))
{
echo '<td bgcolor="#00FF00">';
echo "$row[1]";
echo '</td>'; echo '<td bgcolor="#00FF00">';
echo "$row[2]";
echo '</td>'; echo '<td bgcolor="#00FF00">';
echo "$row[3]";
echo '</td>';
}
echo "</tr>\n";
echo "</table>\n";
?> 运行的时候错误提示如下:
Call to undefined function fetch_row() in /var/www/betacom/showlist.php on line 23
-->$row = $comment->fetch_row($result)
有时候也用mysql_fetch_row