Re: Maximum execution time exceeded!
| From: | Josh G | Date: | Mon, 29 Jan 2001 22:39:38 +0000 |
| Subject: | Re: Maximum execution time exceeded! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37158@lists.php.net to get a copy of this message | ||
Of course, you have this code:
> while ($prescene2 == 0) {
> $i=$i+1;
> }
Where $prescnene2 is not modified, hence you get an
endless loop. When you increase the timeout, that loop
just gets longer to run.
Gfunk - http://www.gfunk007.com/
I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.
----- Original Message -----
From: "Chakravarthy K Sannedhi" <san_kalyan@yahoo.com>
To: <php-general@lists.php.net>
Sent: Monday, January 29, 2001 2:37 PM
Subject: [PHP] Maximum execution time exceeded!
> hi all,
>
> when i am trying to calculate the number of rows with a '0' in a
> particular column using the following code, it is giving the 'Maximum
> execution time exceeded' message, eventhough after i gave
> set_time_limit(60), it didn't worked, infact now it is even worse the
> browser is getting siezed.
>
> $result=mysql_query("select * from mytable");
> while ($avgrow=mysql_fetch_array($result))
> {
> $prescene2 = $avgrow["scene2"];
> $prescene4 = $avgrow["scene4"];
> $prescene5 = $avgrow["scene5"];
> $prescene7 = $avgrow["scene7"];
> $prescene8 = $avgrow["scene8"];
> $prescene9 = $avgrow["scene9"];
> $i = 1;
> while ($prescene2 == 0) {
> $i=$i+1;
> }
> }
> printf ("Number of zeros=%d",$i);
>
> Can any one please help me with this.
>
> TIA
> kalyan
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>