Perad Posted March 14, 2008 Share Posted March 14, 2008 I have this query? $sql = "SELECT * FROM x_poll WHERE category='$poll'"; Is there anyway to return one random result without using php rand? Link to comment https://forums.phpfreaks.com/topic/96128-random-mysql/ Share on other sites More sharing options...
lordfrikk Posted March 14, 2008 Share Posted March 14, 2008 <?php $sql = "select * from x_poll where category = '$poll' order by rand() limit 1"; ?>/code] Link to comment https://forums.phpfreaks.com/topic/96128-random-mysql/#findComment-492094 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.