Fetch data randomly from MySQL database is to use "ORDER BY rand() function.
Example:
$result=mysql_query("select * from tablename order by rand() limit 5");
Example:
$result=mysql_query("select * from tablename order by rand() limit 5");
No comments:
Post a Comment