Re: Maximum Execution Time Exceeded

From: Date: Mon, 28 Mar 2005 22:02:20 +0000
Subject: Re: Maximum Execution Time Exceeded
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-211734@lists.php.net to get a copy of this message
mikeytf@aol.com wrote:
I would like to know if you could help me.. I don't understand what is wrong! I made a file that is supposed to list 2 categories with the boards that go to them under them. I get a Fatal Error: Maxmimum execution time of 30 seconds exceeded. Here is the file that gives me the error: http://subzer0.net/php/index.php Here is the source code for the file: http://subzer0.net/php/index.phps
You did not use any curly braces, but from a quick look it seems you should. For example this code will assign to $board variable multiple times but the variable will never be used: while($get_cat=mysql_fetch_row($category)) $board=mysql_query("SELECT * FROM boards WHERE hidden='No' AND catid='.$get_cat[0].' ORDER BY boardid ASC"); Your current code with braces in is: $category=mysql_query("SELECT * FROM categories ORDER BY catid ASC"); while($get_cat=mysql_fetch_row($category)) {
    $board=mysql_query("SELECT * FROM boards WHERE hidden='No' AND catid='.$get_cat[0].' ORDER BY boardid ASC");
} while($board=mysql_query("SELECT * FROM boards WHERE hidden='No' AND catid='.$get_cat[0].' ORDER BY boardid ASC")) {
    $get_board=mysql_fetch_row($board);
} while($get_board=mysql_fetch_row($board) AND $get_cat=mysql_fetch_row($category)) { echo '</table><table border="0" align="center" width="100%"><tr class="cell2" align="center"><td><b><i>'. $get_cat[1] . '</i></b></td></tr></table><table border="0" align="center" width="100%"><tr ',shading(),'><td><a href="/php/topics.php?board='.$get_board[0].'">'.$get_board[1].'</a><br /><small>'.$get_board[2].'</small></td><td>'.$get_board[3].'</td><td>'.$get_board[4].'</td><td>'.$get_board[5].'</td></tr>'; }

« previous php.general (#211734) next »