Home > Archive > MySQL ODBC Connector > September 2005 > Making ORDER BY RAND() more random









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Making ORDER BY RAND() more random
Graham Anderson

2005-09-30, 8:23 pm

is there a way to make ORDER BY RAND() at bit more spontaneous ?
I am using it in a php statement:
$sql = "SELECT media.id,
artist.name as artist,
artist.spanish as bio,
artist.purchaseLink,
artist.picture,
media.spanish as trackName,
media.path,
media.quality,
mediaType.id as mediaType
FROM artist, media, playlistItems, mediaType
WHERE playlistItems.playlist_id = $myID
AND playlistItems.media_id = media.id
AND media.artist_id = artist.id
AND media.mediaType_id = mediaType.id
ORDER BY RAND() LIMIT 0, 30";


the result seems to be pretty predictable ....
is there a way to improve RAND() or is there something better ?



g


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com