Gah can't figure out really simple MySQL!

Associate
Joined
16 May 2005
Posts
680
Two columns, one has an image name the second image category. Basically I want to select an image from each category (there's 4 categories) so I need something along the lines of

Code:
"SELECT flash_box_category_id, flash_box_image FROM flash_box GROUP BY flash_box_category_id ORDER BY RAND() LIMIT 4";

Now this pulls out 4 different category images, but it's the same 4 each time, the rand isn't used?
 
Back
Top Bottom