Re: Script timeout?
| From: | memoimyself at yahoo dot com dot br | Date: | Tue, 27 Jan 2004 14:36:24 +0000 |
| Subject: | Re: Script timeout? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175914@lists.php.net to get a copy of this message | ||
Hello Ben,
On 27 Jan 2004 at 9:27, Ben Ramsey wrote:
> I'm trying to run a query against a database with a PHP script that
> cycles through each record (about 4,000+) and sends and e-mail to them
> if they have an e-mail address present. The problem is that everytime I
> do this, it processes about 430 records and stops. There is no error
> message generated. Could this be due to a script timeout? If so, how
> do I raise the timeout value?
Look up set_time_limit in the PHP manual. Also, consider retrieving all the records first
with a single db query, storing all e-mails in an array, and then sending out the e-mails
in a separate operation. Why query your db 4000+ times when you can query it only
once?
Good luck,
Erik