Select random database value?

Thread Solved

Join Date: Feb 2008
Posts: 213
Reputation: nikesh.yadav is an unknown quantity at this point 
Solved Threads: 17
nikesh.yadav's Avatar
nikesh.yadav nikesh.yadav is offline Offline
Posting Whiz in Training

Select random database value?

 
0
  #1
Mar 28th, 2008
I m working on advertise website for that i need to select random values from the database
so please help me

Thanx in advance
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 213
Reputation: nikesh.yadav is an unknown quantity at this point 
Solved Threads: 17
nikesh.yadav's Avatar
nikesh.yadav nikesh.yadav is offline Offline
Posting Whiz in Training

Re: Select random database value?

 
0
  #2
Mar 28th, 2008
i Got the result myself and answer is

  1. SELECT * FROM tablename ORDER BY RAND() LIMIT 0,30

bye
Last edited by peter_budo; Mar 30th, 2008 at 5:46 am. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC