Posted by Knut Krueger on 11/22/07 16:57
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> result resource in /home/grad/ccomp/06/guedesav/public_html/PbBlog/inc/
> db.php on line 28
> (line 28 is "while($data = mysql_fetch_array($result,MYSQL_ASSOC))")
>
> and havingthis warning on the HTML output leads to be impossible to
> use header() to, for instance, go back to the post removal page. Is
> there any way to know prior to fetching if my result is of and INSERT/
> UPDATE/DELETE instead of a SELECT query?
withour talking abut the SQL problem - see the other guys it should be
possible to prvent the error message with
$data = @mysql_fetch_array($result,MYSQL_ASSOC))
I do not know whether it is working with
mysql_fetch_array($result,MYSQL_ASSOC))
but it is working with @mysql_query and @mysql_num_rows
Regards Knut
[Back to original message]
|