RE: [PHP-DB] Noob error question
| From: | John W. Holmes | Date: | Sun, 06 Oct 2002 19:41:16 +0000 |
| Subject: | RE: [PHP-DB] Noob error question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22237@lists.php.net to get a copy of this message | ||
Is this on a live site, or one with just this test script running? You
may be running into the max_connections of mysql.
You're not connecting for _every_ query on the page, are you? You should
have just one connect at the beginning, do all of your queries, then
close at the end of the script.
---John Holmes...
> -----Original Message-----
> From: Noah Smith [mailto:nsmith@thirdform.com]
> Sent: Sunday, October 06, 2002 2:55 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Noob error question
>
> This may be a rather noob question, but:
>
> I make several requests against a mysql db roughly of the form:
> mysql_connect
> mysql_select_db
> mysql_query
> mysql_close
>
> This will work for several connections (and sometimes all connections
> over the course of the script)
>
> On occassion, the script will be unable to connect at all, and
sometimes
> it is not able to connect randomly within the script:
>
> Thanks,
>
> Noah
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php