Re: Maximum Execution Time Exceeded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mikeytf@xxxxxxx 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>';
}


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux