blacknight Posted June 8, 2007 Share Posted June 8, 2007 im trying to get a value from a database where there are 3 lines to chose from example id | Name | Total 1 joey 56 2 bob 12 3 jeff 45 i want the script to output the line with id of 1 because it has the highest any one have any ideas? Quote Link to comment Share on other sites More sharing options...
cmgmyr Posted June 8, 2007 Share Posted June 8, 2007 try: SELECT * FROM table ORDER BY Total DESC LIMIT 1 Quote Link to comment Share on other sites More sharing options...
blacknight Posted June 8, 2007 Author Share Posted June 8, 2007 worked i guess i was tryen to make it more diffacult then it was i was tryen to use the MAX() function lol 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.