Call to a member function fetch_row() on a non-object的问题
运行出错:Fatal error: Call to a member function fetch_row() on a non-object in E:\AppServ\www\exercitation\Show.php on line 30
<?PHP
$existRecord = False;
$objContent = new Content();
$results = $objContent->load_content_byPage($pageNo, $pageSize);
// 使用while语句显示所有$results中的留言数据
while($row = $results->fetch_row()) { //第30行
$existRecord = True;
?>
最后也有如果没数据输出了。
<?PHP
} // end of while
if(!$existRecord) {
?>
<tr>
<td width="148" height="16" align=center class="main">没有留言数据</td>
</tr>
<?PHP
} // end of if
echo("</table></center></div>");
} // end of function
?>
数据库连接是没问题的。数据也有手动插入了。
<?PHP
$existRecord = False;
$objContent = new Content();
$results = $objContent->load_content_byPage($pageNo, $pageSize);
// 使用while语句显示所有$results中的留言数据
while($row = $results->fetch_row()) { //第30行
$existRecord = True;
?>
最后也有如果没数据输出了。
<?PHP
} // end of while
if(!$existRecord) {
?>
<tr>
<td width="148" height="16" align=center class="main">没有留言数据</td>
</tr>
<?PHP
} // end of if
echo("</table></center></div>");
} // end of function
?>
数据库连接是没问题的。数据也有手动插入了。
...全文
相关推荐
用mysql_fetch_array()获取当前行数据的方法详解
本文将详细介绍如何使用PHP内置函数`mysql_fetch_array()`来从MySQL数据库中获取当前行的数据。这个函数与`mysql_fetch_row()`功能相似,但提供更多的灵活性,因为
计算机编程术语总结
计算机编程术语: 参考网址:https://blog.csdn.net/linear_luo/article/details/52318820 application 应用程式 应用、应用程序 application framework 应用程式框架、应用框架 应用程序框架 architecture 架构、系统架构 体系结构 argument 引数(传给函式的值)。叁见 param...
11g_plsql_user_guide_and_reference.pdf
call based on its input parameters.
PHP中mysql_field_type()函数用法
FROM mytable ORDER BY title";$result = mysql_query($query);$row = mysql_fetch_row($result);echo mysql_field_type
PHP语法速查卡高级版
```php $result = @some_function(); // 如果 `some_function()` 出错,错误会被忽略 ```#### 数据库操作(MySQL)- **连接数据库**


基础编程
