westman Posted November 17, 2012 Share Posted November 17, 2012 this has not been tested due to been inside a cron job but will this work with RAND and DESC? $sql_call = mysql_query("SELECT * FROM table WHERE new_ref='1' ORDER BY ref_num DESC RAND() LIMIT 1"); Link to comment Share on other sites More sharing options...
justsomeguy Posted November 19, 2012 Share Posted November 19, 2012 Rand is out of place there, what exactly are you trying to do? There's no reason not to test that, copy and paste it into phpMyAdmin and run it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now