...

View Full Version : Selecting 2 random rows



ole90
06-09-2007, 01:58 PM
Hey guys,

i want to select two random rows from a table.

Select 2 FROM `items`

thats what i thought- but that doesn't seem to work. Any ideas?

EDIT: nevermind, i found it out. It was, for anyone wondering, SELECT * FROM `items` ORDER BY RAND() LIMIT 2



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum