zohab Posted July 11, 2007 Share Posted July 11, 2007 hi all In my project i need to select random records from table with unique values i had implemented this with mysql rand function but i am gettng repated records with this function in sql we have newid() function which gives random+unique records. how can we do this mysql or using php i use rand() as "select * from tablename order by rand()" any help? thanks in advance best regards zohab Quote Link to comment https://forums.phpfreaks.com/topic/59419-how-select-random-records-from-table-with-unique-values/ Share on other sites More sharing options...
bubblegum.anarchy Posted July 11, 2007 Share Posted July 11, 2007 http://www.phpfreaks.com/forums/index.php/topic,125759.0.html Quote Link to comment https://forums.phpfreaks.com/topic/59419-how-select-random-records-from-table-with-unique-values/#findComment-295238 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.