12-07-2007, 02:36 PM
|
#4 (permalink)
|
|
The Reckoner
Join Date: Sep 2007
Posts: 437
Thanks: 22
|
Can't you just test for the existence of $cat outside the query and then insert data if you have any...
PHP Code:
$szCatQuery = isset($cat) ? "WHERE $cat = 1" : '';
$result = mysql_query(" select * from $dbName //Next Line $szCatQuery order by updated DESC, time DESC LIMIT $from, $max_results");
__________________
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
|
|
|
|