oh dummy me i read your error wrong sorry well i would say try this code
Find: (should be around line 307ish in affiliates.php)
PHP Code:
$faffiliate=$db->query_read("SELECT affiliate_id,sitename,siteurl,buttonurl,name,id,sitedesc,clicksout,clicksin,totalrating,totalvotes
FROM " . TABLE_PREFIX . "affiliates AS affiliates LEFT JOIN " . TABLE_PREFIX . "affiliates_types AS affiliates_type
ON " . TABLE_PREFIX . "affiliates.type = " . TABLE_PREFIX . "affiliates_types.id
WHERE active='1' AND approved='1'
ORDER BY $by $in
LIMIT $limitvalue,$perpage"
);
Replace with: on the first line in this code there is a space between tota lrating just remove the 2 spaces and it should work just fine.
PHP Code:
$faffiliate=$db->query_read("SELECT affiliate_id,sitename,siteurl,buttonurl,name,id,sitedesc,clicksout,clicksin,totalrating,totalvotes
FROM " . TABLE_PREFIX . "affiliates LEFT JOIN " . TABLE_PREFIX . "affiliates_types
ON " . TABLE_PREFIX . "affiliates.type = " . TABLE_PREFIX . "affiliates_types.id
WHERE active='1' AND approved='1'
ORDER BY $by $in
LIMIT $limitvalue,$perpage"
);
Thats how i have my code setup and it is working just fine and when i tried it your way it doesn't work...
EDIT: Fix down in post #
88