FinalFrontier Posted January 21, 2012 Share Posted January 21, 2012 I have a row in a MySQL table called id, which auto-increments. I was wondering if anyone knows a PHP solution to find out what the highest number in the row is? I am thinking perhaps execute a MySQL query that will list the highest number, and then echo the result, like $row[id] in PHP? Link to comment https://forums.phpfreaks.com/topic/255466-finding-out-the-highest-number-in-an-auto-incrementing-table/ Share on other sites More sharing options...
SergeiSS Posted January 21, 2012 Share Posted January 21, 2012 Do you ever heard about function MAX() in MySQL? You need it. Link to comment https://forums.phpfreaks.com/topic/255466-finding-out-the-highest-number-in-an-auto-incrementing-table/#findComment-1309788 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.