Hi!
I have a mysql database filled with records. I want to get 5 random records..how do i do that ?
Thanks!
Printable View
Hi!
I have a mysql database filled with records. I want to get 5 random records..how do i do that ?
Thanks!
edit: by the way, a simple google search would have handed you the answer also.PHP Code:$query = "SELECT * FROM tablename ORDER BY RAND() LIMIT 5";
Thanks! :-D