August 20th, 2006, 02:51 PM
|
#3 (permalink)
|
| Junior Member Verified Customer
Join Date: Feb 2005
Posts: 21
|
Thanks. all seems to be working fine except I get this error when sorting by rating - any ideas? Quote:
Database error in vBulletin 3.6.0:
Invalid SQL:
SELECT IF(votenum >= , votenum, 0) AS votenum, IF(votenum >= AND votenum> 0, votetotal / votenum, 0) AS voteavg, images.imageid
FROM adv_gallery_images AS images
WHERE valid = 1 AND votenum >=
ORDER BY voteavg DESC, votenum DESC, images.imageid DESC
LIMIT 30;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' votenum, 0) AS votenum, IF(votenum >= AND votenum> 0, votetotal / votenum, 0) ' at line 1
Error Number : 1064
| |
| |