bbaker Posted June 29, 2007 Share Posted June 29, 2007 replace the query with this...it'll select a random record. $query = "SELECT * FROM presents WHERE id = '$studioday' ORDER BY RAND() LIMIT 1 "; Link to comment https://forums.phpfreaks.com/topic/57748-solved-need-the-code/page/2/#findComment-286218 Share on other sites More sharing options...
Hoddz Posted June 29, 2007 Author Share Posted June 29, 2007 I got the random bit sorted... ORDER BY RAND() So now all is working as I wanted it to. If any of you want to see it in order, head over to http://www.pukkaradio.net/beta/ Ditto at what you put bbaker! Thanks again for your help, same to you nadeemshafi9!! Link to comment https://forums.phpfreaks.com/topic/57748-solved-need-the-code/page/2/#findComment-286219 Share on other sites More sharing options...
bbaker Posted June 29, 2007 Share Posted June 29, 2007 glad to help Link to comment https://forums.phpfreaks.com/topic/57748-solved-need-the-code/page/2/#findComment-286221 Share on other sites More sharing options...
nadeemshafi9 Posted June 29, 2007 Share Posted June 29, 2007 nice, bbaker yeh the power of SQL, i alwways underestimate it Link to comment https://forums.phpfreaks.com/topic/57748-solved-need-the-code/page/2/#findComment-286223 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.