webdev.ramyash@gmail.com

Web Development: Fetch data randomly from database in PHP.


Fetch data randomly from database in PHP.

Fetch data randomly from database in PHP.

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");

No comments:

Post a Comment