SirChick Posted December 2, 2007 Share Posted December 2, 2007 Is there a way to get "all" rows in a query and then using a random to pick a row like for example row 8 of the current rows available.. and if that row is non existing die.? Link to comment https://forums.phpfreaks.com/topic/79880-solved-rand-row-selection/ Share on other sites More sharing options...
Wes1890 Posted December 2, 2007 Share Posted December 2, 2007 you mean select a random DB row? use: mysql_query("SELECT * FROM your_table ORDER BY RAND() LIMIT 1"); that will select 1 random row Link to comment https://forums.phpfreaks.com/topic/79880-solved-rand-row-selection/#findComment-404458 Share on other sites More sharing options...
SirChick Posted December 2, 2007 Author Share Posted December 2, 2007 right ok thankyou i will play around with that and see what results i get out of it Link to comment https://forums.phpfreaks.com/topic/79880-solved-rand-row-selection/#findComment-404484 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.