Re: [PHP] php 5 and mysql failure



On Wed, Apr 30, 2008 at 2:31 AM, Yehudi Alexis Garrett <yehudi@xxxxxxx>
wrote:

I'm using a php script which performs three xml queries to other three
servers to retrieve a set of ids and after I do a query to mysql of the kind
SELECT * FROM table WHERE id IN ('set of ids');
Although I'm sure the connection to the database is ok, I sometimes get an
error of this kind:
*Warning*: mysql_fetch_object(): supplied argument is not a valid MySQL
result resource in ...
This does not happen every time i run the script, only sometimes.
If I echo the query, copy and paste in phpmyadmin, or if I perform the
same query in a script that does only the query without the rest it works!
After troubleshooting this issue I noticed that it usually failed when I
had a big set of ids (positive response from more than one server). This
means that the script used a bigger amount of memory and probably more
resources, but I did not get an "out of memory error", I got the one
described bfore.
My question is, is there any kind of limit somewhere in php5 or in mysql?
Thanks for help,

YEHUDI GARRETT

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Have you tried output your SQL query and pasting it into mysql to see if it
runs? Sounds to me like it isn't a valid query, that would give you that
error.

You may also want to put some row count checking prior to trying to fetch
any rows.

--
-Dan Joseph

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


Relevant Pages

  • Re: php 5 and mysql failure
    ... MySQL result resource in ... ... If I echo the query, copy and paste in phpmyadmin, or if I perform the ... I had a big set of ids. ... Your error indicates mysql_queryreturned false. ...
    (comp.lang.php)
  • Re: php 5 and mysql failure
    ... servers to retrieve a set of ids and after I do a query to mysql of ... MySQL result resource in ... ... If I echo the query, copy and paste in phpmyadmin, or if I perform the ... I had a big set of ids. ...
    (comp.lang.php)
  • Re: MySQL Clustering
    ... There is a very usefull book of O-Reilly on MySQL load ... and load balancing only works for read-only ... connected to multiple back end servers (8 in my ... Query OK, ...
    (freebsd-isp)
  • Re: php 5 and mysql failure
    ... servers to retrieve a set of ids and after I do a query to mysql of ... MySQL result resource in ... ... If I echo the query, copy and paste in phpmyadmin, or if I perform the ... I had a big set of ids. ...
    (comp.lang.php)
  • Re: Problem with SQL and Recordset
    ... This assumes that the name of the subform control on the parent form is the ... NextSuffix field from the "query" to be entered into the Suffix field on ... Dim mySQL As String ...
    (microsoft.public.access.modulesdaovba)