Bug with table prefixes when viewing "awards.php?award_cat_id=x"
Got an sql error.
Fixed it by changing this
Code:
// check to see if we have already got the results from the database
$fcache = array();
$award_cats = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "award_cat
" . iif($display_award_cat_id, "WHERE award_cat.award_cat_id = $display_award_cat_id", '') . "
ORDER BY award_cat_displayorder
");
To this
Code:
// check to see if we have already got the results from the database
$fcache = array();
$award_cats = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "award_cat
" . iif($display_award_cat_id, "WHERE " . TABLE_PREFIX ."award_cat.award_cat_id = $display_award_cat_id", '') . "
ORDER BY award_cat_displayorder
");
You were missing a table_prefix after the where statement
Also, noticed that the "awards_bit" template isn't getting cached when viewing threads?
Causing alot of extra queries.