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)
?
Warning: mysql_fetch_array($result) expects parameter 1 to be resource, array given in
try:
mysql_query($query1) or die(mysql_error());
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.