Forum Moderators: coopster

Message Too Old, No Replies

random query?

         

camilord

9:12 pm on May 28, 2007 (gmt 0)

10+ Year Member



is there a command that randomly? hehhee.. sounds wierd.. hahahaha... just asking...

this is for Ads... a list of Ads, let's say 100 Ads, then i want to pick 10 Ads out of 100 Ads... and it must be random picks..

is this possible for MySQL?

advance thanks for the answers...

jatar_k

9:27 pm on May 28, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



try this
[dev.mysql.com...]

ORDER BY RAND() combined with LIMIT is useful for selecting a random sample from a set of rows

camilord

9:48 pm on May 28, 2007 (gmt 0)

10+ Year Member



thanks a lost... it solve my problem... weeeeeehhh..