Incorrect arguments to RAND, on a new server
Posted: Mon Jul 17, 2006 10:28 am
Hi,
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:
How can I get rid of this error, I can configure and install new scripts on my site but I still have a limited knowledge of php/mysql
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())");