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? Link to comment https://forums.phpfreaks.com/topic/54827-getting-line-data-with-highest-number-in-specified-collum/ 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 Link to comment https://forums.phpfreaks.com/topic/54827-getting-line-data-with-highest-number-in-specified-collum/#findComment-271183 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 Link to comment https://forums.phpfreaks.com/topic/54827-getting-line-data-with-highest-number-in-specified-collum/#findComment-271187 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.