This is more of a mysql query question, I've been using the same scripts for over 2 years, never had any problems with them but now I have moved to a new server and I am getting this error when I try running the script:
select count(*) from list WHERE list_locationid='15' AND list_member!='' ORDER BY RAND(list.list_photo),RAND(NOW())
Incorrect arguments to RAND
Here is the query:
Code: Select all
$paging->Query("SELECT (TO_DAYS(CURDATE())-TO_DAYS(list_adddate)) AS daysFromAdd, (TO_DAYS(CURDATE())-TO_DAYS(list_update)) AS daysFromUpdate,list.* FROM list WHERE list_locationid='$location_id' AND $filter_section $city_filter ORDER BY RAND(list.list_photo),RAND(NOW())");