12-05-2008, 10:02 AM
|
#5 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
Sorry to nit-pick here, but your try..catch block isn't doing much, you need to throw and exception before its caught:
PHP Code:
if(!$q=mysql_query('SELECT ArticleID FROM articles')) { throw new Exception(mysql_error()); }
would do it, also there is no need for the 'exit' as and exception stops the current execution anyway.
I agree with Wildhoney about the curly braces, although not needed for PHP to execute it, it will make debugging harder in the future
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|