QAds
12 Ay Taksit
Motorola A1200 MING Smartphone
$77.58
Apple iPad 32gb Wi-Fi
$378.62
Canon Digital Rebel XT 8MP Digital SLR Camera with EF-S 18-55mm f3.5-5.6 Lens
$175.34
Motorola PEBL U6 Camera and Bluetooth
$59.28
:: HOME » MySQL » RAND function - Random Data
 
RAND function - Random Data

How to query random data row by MySQL:

SELECT * FROM table_name ORDER BY RAND() LIMIT 1;

To be able to get random row or rows from database you just need to use RAND() at ORDER BY and after that determine the how many rows you want to get by using LIMIT.


MySQL RAND function - Random Data MySQL RAND function - Random Data MySQL RAND function - Random Data
MySQL RAND function - Random Data
NEW QUESTION
 
Your E-Mail Address
»
Your e-mail will never be shown!  
   
 
Question
»
Please type your question and please use [CODE] tag for your codes!  
  Add CODE Quote BOLD ITALIC Underline Align Left Align Center Align Right Add Line  
   
 
Human Check
»
Enter human check code below!  
   
 
       
 
* Your Question will be answered as soon as possible, probably within 24 hours!
MySQL RAND function - Random Data MySQL RAND function - Random Data MySQL RAND function - Random Data
MySQL RAND function - Random Data
 
Website Designer, Search Engine Optimization Expert, Ajax Developer,Developed And Designed By Mumin Celik With Using PHP, MySQL, CSS, JavaScript, Ajax And Search Engine Optimizer Sinema ve Film Rehberi Sudoku Oyunu