Re: Auto-update database records
| From: | Tony | Date: | Wed, 12 Jun 2002 19:36:57 +0000 |
| Subject: | Re: Auto-update database records | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19767@lists.php.net to get a copy of this message | ||
I finally got this auto-update script to work, thanks for your so many
replies.
Tony S. Wu
Jason Wong at phplist@gremlins.com.hk wrote:
> On Saturday 08 June 2002 21:34, Tony wrote:
>> I do appreciate your reply.
>> Yes, I've tried to track down the problem.
>> I comment-out the fopen() function and use echo to display the URL.
>> And it displays fine, so I did get the record from MySQL.
>> Then when I put the fopen() back, same problem appears.
>
> You did check that $buffer contains what you expect for each iteration of
> $final_result?
>
>> I think it's probably because I have too much data to update at once, over
>> a hundred maybe?
>> Then it causes the PHP to timeout this script hence the error.
>
> You can use set_time_limit(3000) inside a loop (probably the foreach) as each
> time it is used it will reset the max execution time to 3000secs.
>
> As I said before, see what's happening to the value of $counter. Or simplify
> that loop with a regular expression.