> according tho the description at
> <http://www.mysql.com/doc/M/a/Mathematical_functions.html>, that looks

>> $result = mysql_db_query ("$DBName","select * from Contacts order by rand()
>> LIMIT 5 ");
>> Doesn't work at all. :(

What version of MySQL are you using?  I remember something about ordering by
rand() only working in 3.23.xx.  If you're using 3.22.xx, it won't work.

You could do something with mysql_data_seek() and the php mt_rand() function
if that's the case.  It would be klunky, but you could probably get it to


Paul Burney

| Paul Burney             | P: 310.825.8365                 |
| Webmaster && Programmer | E: <[EMAIL PROTECTED]>   |
| UCLA -> GSE&IS -> ETU   | W: <http://www.gseis.ucla.edu/> |

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to