php mysql_query returns empty value
I created a directory listing and came across this issue.
What value does mysql_query($query1)
return if there is no value?
My script received this message from $result
, would it be alright to pass array(0)
开发者_如何学C?
Warning: mysql_fetch_array($result) expects parameter 1 to be resource, array given in
try:
mysql_query($query1) or die(mysql_error());
php.net
For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, mysql_query() returns a resource on success, or FALSE on error
If it doesn't return FALSE
, you can use mysql_num_rows
to find out just how many rows were returned.
精彩评论