note 88752 added to function.mysql-query
| From: | tbthorpeatthegooglemailone! at osu1 dot php dot net | Date: | Fri, 06 Feb 2009 00:40:49 +0000 |
| Subject: | note 88752 added to function.mysql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-150276@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 64.71.164.2
Probable Submitter: 76.15.221.147
----
Manual Page -- http://www.php.net/manual/en/function.mysql-query.php
Edit -- https://master.php.net/note/edit/88752
Del: integrated -- https://master.php.net/note/delete/88752/integrated
Del: useless -- https://master.php.net/note/delete/88752/useless
Del: bad code -- https://master.php.net/note/delete/88752/bad+code
Del: spam -- https://master.php.net/note/delete/88752/spam
Del: non-english -- https://master.php.net/note/delete/88752/non-english
Del: in docs -- https://master.php.net/note/delete/88752/in+docs
Del: other reasons-- https://master.php.net/note/delete/88752
Reject -- https://master.php.net/note/reject/88752
Search -- https://master.php.net/manage/user-notes.php