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? Quote Link to comment 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] Quote Link to comment 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.