bobrivers2003
Technical User
I have a mySQL table that includes requests with an auto increment id. The id's go from 0-n where n is the number of rows in the table. To select the lastest one I currently do a row count then "SELECT * FROM table WHERE id=$rowcount; to get the latest request.
This works fine if the id went from 0-n without missing any rows. e.g. for 1,3,4,5,10. The row count is 5 but instead of getting the latest request (id=10) it will pull request with id 5 not 10.
Is there a work around to this?
This works fine if the id went from 0-n without missing any rows. e.g. for 1,3,4,5,10. The row count is 5 but instead of getting the latest request (id=10) it will pull request with id 5 not 10.
Is there a work around to this?