Invalid MySQL result resource

From: Date: Thu, 13 Sep 2001 04:23:10 +0000
Subject: Invalid MySQL result resource
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67119@lists.php.net to get a copy of this message
Hello, What is the best way to accomplish the following?: Connect to MySQL database Execute a query Fetch a row from that query (mysql_fetch_array) Based on the data from the original query, generate a second query Execute the second query Fetch a row from the second query (mysql_fetch_array) Fetch another row from the first query (mysql_fetch_array) Based on the data from the original query, generate a second query Execute the second query Fetch a row from the second query (mysql_fetch_array) ...etc, until I have processed all the rows in the original query. I am attempting to do this, and keep getting "Supplied argument is not a valid MySQL result resource in ..... on line 52" Line 52 is the line where I fetch the row from the second query. Is there a rule I am violating? I've read the manual, searched online databases, etc etc and I don't find anything. I've done this with other SQL databases and PHP, is there something special about MySQL that I am not aware of? Thanks Dan

« previous php.general (#67119) next »