jaymc Posted August 26, 2006 Share Posted August 26, 2006 Here is the query im running to select 100 mobile numbers from a database[b]$query = "SELECT * FROM `ibf_members` WHERE `mobilenum` !=NULL LIMIT 0,100";[/b]However, I want to to select 100 at random, not the first 100 in the tableHow can I achieve that? Link to comment https://forums.phpfreaks.com/topic/18718-random-solved/ Share on other sites More sharing options...
shocker-z Posted August 26, 2006 Share Posted August 26, 2006 this should work$query = "SELECT * FROM `ibf_members` WHERE `mobilenum` !=NULL ORDER BY RAND() LIMIT 0,100";just sumet i read on the net once :) Link to comment https://forums.phpfreaks.com/topic/18718-random-solved/#findComment-80706 Share on other sites More sharing options...
jaymc Posted August 26, 2006 Author Share Posted August 26, 2006 Cheers ! That worked a treat Link to comment https://forums.phpfreaks.com/topic/18718-random-solved/#findComment-80712 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.