note 88752 deleted from function.mysql-query by danbrown

From: Date: Fri, 06 Feb 2009 00:51:08 +0000
Subject: note 88752 deleted from function.mysql-query by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150277@lists.php.net to get a copy of this message
Note Submitter: tbthorpe at the google mail one! ---- If anyone can provide insight on this, I'd be extremely appreciative. Why does php kill the connection to the database with each iteration of a loop? I have a table of categories, and a table of items with a specific category. I want to iterate through the list of categories, and while that's happening, pull out the items associated with that category from their table. That means querying the database inside of a loop, but php kills the connection to the db every time. Why is this? Is there a better way around it than putting the connection string and credentials inside of the loop? Thanks.

« previous php.notes (#150277) next »