Reply to Re: even after proper error checking, I still get PHP warnings

Your name:

Reply:


Posted by Alvaro G. Vicario on 08/17/06 21:50

*** lawrence k escribió/wrote (17 Aug 2006 12:48:28 -0700):
> if (is_resource($this->datastoreResultsPointer)) {
> mysql_free_result($this->datastoreResultsPointer);
> mysql_close();
> }
[...]
> Warning: mysql_free_result(): 286 is not a valid MySQL result resource
> in
> /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/McDatastoreResultsMySql.php
> on line 89

According to PHP manual, mysql_free_result()'s argument "comes from a call
to mysql_query()." So if you give it, let's say, a resource generated by
fopen(), it will pass the is_resource() check and then fail at
mysql_free_result().

You can try with get_resource_type() or just ignore the error:

@mysql_free_result(........);



--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--

[Back to original 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

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