|
Posted by bruno_guedesav on 11/22/07 20:20
On 22 nov, 14:57, Knut Krueger <knut.krue...@usa.com> wrote:
> > 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
Oh, yes, it worked, indeed. There's no problem for me to have a single
entrance on the loop because of the first obligatory fetch as long as
it goes away cleanly so I can use headers afterwards, so this thread
is ended for me.
Navigation:
[Reply to this message]
|