mysql_num_rows错误... [英] mysql_num_rows error...

查看:60
本文介绍了mysql_num_rows错误...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

展开 | 选择 | Wrap | 行号

推荐答案

您没有很好地完成查询。


你应该将mysql连接传递给查询,以便它知道在哪里查询。

You are not doing the query well.

you should pass a mysql connection to the query so that it knows where to query.

展开 | 选择 | Wrap | 行号


你的mysql_query()没有返回有效的资源 - 查询是什么?


另外,你是否/ else块可以像这样缩短:

Your mysql_query() doesn''t return a valid resource - what is the query?

Also, you if/else block can be shortened like so:

展开 | 选择 | Wrap | 行号


Billibytes打败了我。


无论如何,有几件事:你不必须将链接资源传递给mysql_ *函数 - 如果你不这样做,mysq l将使用最后打开的连接。


另外:
Billibytes beat me to it.

Anyway, couple of things: You do not have to pass a link resource to the mysql_* functions - if you do not, mysql will use the last opened connection.

Also:
展开 | 选择 | Wrap | 行号


这篇关于mysql_num_rows错误...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆