I am new this.
I have a page that has multiple queries on it, I want to do doing the
Query a mysql db multiple times in the same page, but i must be missing
something, I keep getting these AFTER the first queryis successful:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in /path/php_file.php on line line_number
Can someone point in the right direction on how to do multiple queries,
some are not querying the same db btw.
You need to make sure that you use your statement handles and connection handles so that the functions use the correct connection and such. Of course, that's a pain, so....
You could try using a Database Abstraction class, such as PEAR's DB to help a bit with this. Even easier, though, is to use something like DB_DataObject which encapsulates all of this for you AND gives you a handy place to store all of the data.
PEAR::DB http://pear.php.net/package/DB PEAR::DB_DataObject http://pear.php.net/package/DB_DataObject
-- paperCrane <Justin Patrin> -- Question Everything, Reject Nothing
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php