what would be the best way to make MYSQL's RAND() more random ?
my random result set always seems pretty predictable. The first record
in the result set always seems to be the same 4 tracks :(
Would adding some kind of random seed like RAND($randomNumberGenerator)
work ?
If so, how do you implement this ?
$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($randomSeed) LIMIT 0, 30";
many thanks in advance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php