Warning: mysql_fetch_array():
发布:smiling 来源: PHP粉丝网 添加日期:2013-11-28 09:48:36 浏览: 评论:0
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
- $connect=mysql_connect("localhost","root","123") or die("无法连接数据库".mysql_error());
- mysql_select_db("cmstest") or die("无法选择数据库".mysql_errno());
- $sql="select * from article where pid=1";
- $result=mysql_query($sql,$connect) or die("无法查询sql语句".mysql_error());
- $nums=mysql_num_rows($result);
- echo "nums is:".$nums;
- while($res=mysql_fetch_array($result)){
- echo $res[0];
- }
原来是$result重复了.
Tags: Warning: mysqlfetcharray
相关文章
- ·Warning: Missing argument 3 for photo_bigclass()(2013-11-28)
- ·Warning: mssql_connect() [function.mssql-connect]:(2013-11-28)
- ·Warning: mysql_fetch_assoc() expects parameter 1 to be resource(2013-12-02)
- ·php 提示Warning: mysql_fetch_array() expects(2014-01-09)
- ·Warning: mysql_num_rows():(2014-01-14)
- ·Warning:chmod() has been disabled for security reasons in(2014-08-23)
- ·php提示 Warning: touch() [function.touch]: Utime failed: Permission denied in(2014-09-20)
- ·php提示Warning: file_get_contents(): couldn’t resolve(2014-09-20)
- ·PHP Warning:phpinfo() has been disabled函数禁用(2014-09-21)
- ·php 提示Warning: mysql_fetch_array() expects(2014-09-21)
- ·php下foreach()错误提示Warning: Invalid argument supplied for foreach()(2014-09-22)
- ·phpmyamdin安装出现Warning: require(./libraries/Error_Handler.class.php) 错(2015-04-04)
- ·PHP Warning: implode() [function.implode]: Invalid(2015-04-08)
- ·php下foreach提示Warning:Invalid argument supplied for foreach()的解决方法(2021-04-25)
- ·php提示Warning:mysql_fetch_array() expects的解决方法(2021-05-03)
- ·PHP Warning: Module 'modulename' already loaded in问题解决办法(2021-05-16)
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)