SELECT * FROM table_name ORDER BY RAND() LIMIT 0,1
You can use mysql rand() function to easily get a random data row.
but be warned that for large data tables this function is said to be slow.
If you like to learn more about SLIIT please visit www.sliit.lk
No comments:
Post a Comment