You are here: Re: PHP/MySQL warnings about results « PHP Programming Language « IT news, forums, messages
Re: PHP/MySQL warnings about results

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация