Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Selecting 2 random rows
06-09-2007, 01:58 PM #1
- Join Date
- Jan 2007
- Thanked 0 Times in 0 Posts
Selecting 2 random rows
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
Last edited by ole90; 06-09-2007 at 02:28 PM.