06-08-2008, 07:09 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
|
Order by rand()
I have a query that looks like:
Code:
SELECT * FROM tbl_gallery WHERE fld_userid = $UserID ORDER BY RAND() LIMIT 4
I've read that using rand() isn't a good idea as it takes a lot of system resources. How can I rewrite the query to do the same thing without putting too much strain on my server?
|
|
|