Hello.
I have been developing a small script for someone, using MySQL, on a local level, and all works great. I have the newest versions of php and mysql
The person I am developing this for is using MySQL version: 3.0.16
The following line throws an error:
$query = "SELECT * FROM questions WHERE deleted = '0' ORDER BY RAND() LIMIT 10";
and the error is:
You have an error in your SQL syntax near 'RAND() LIMIT 10' at line 1
I know that RAND is only valid on 3.0.7, as php manual states:
Note: In versions before 3.0.7 the meaning of max was range. To get the same results in these versions the short example should be rand (5, 11) to get a random number between 5 and 15.
So, I was hoping someone could help me backward-code the above SQL statement.
Thanks!
JbA