View Full Version : Selecting 2 random rows

06-09-2007, 02: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