The PHP SQL Random is used to fetch data randomly from database in PHP. The Rand ( ) clause is used to fetch the random data from table into the browser.
Understand with Example
The Tutorial illustrate an example from PHP SQL Random. To understand and elaborate the example we have a table 'users' that show the records of table 'users'.
Source Code of sql_random.php
This example show you to fetch random data from database table. In this example we create select statement with ORDER BY RAND() clause in PHP. The RAND( ) clause is used to fetch data from table randomly.
when we refresh the browser, it randomly fetched the data from the table and display on the browser.
Posted on: February 4, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles