Thread
:
Random Selection
View Single Post
#
6
(
permalink
)
10-26-2006, 11:29 AM
dirkfirst
Programming Professional
Join Date: May 2006
Posts: 338
Credits:
0
Rep Power:
12
Quote:
Originally Posted by
Jordan
Just use the rand() function of MySQL.
Code:
SELECT * FROM tbl ORDER BY RAND() LIMIT 1;
Thanks, works perfect.
__________________
DirkFirst
dirkfirst
View Public Profile
Send a private message to dirkfirst
Find all posts by dirkfirst