10.4.6
Why do I get an error that looks something like this:
"Warning: 0 is not a MySQL result index in <file>
on line <x>" or "Warning: Supplied argument is not
a valid MySQL result resource in <file> on line <x>?
You are trying to use a result identifier that is 0. The 0 indicates
that your query failed for some reason. You need to check for errors
after submitting a query and before you attempt to use the returned
result identifier. The proper way to do this is with code similar
to the following:
$result = mysql_query("SELECT * FROM tables_priv"); if (!$result) { echo mysql_error(); exit; }
or
$result = mysql_query("SELECT * FROM tables_priv") or die("Bad query: ".mysql_error());
|