WesleyA Posted June 3, 2016 Share Posted June 3, 2016 (edited) For these query (if exists) I am searching. If you want to select the last added record I use this query $hi_val = mysqli_insert_id($conn); Above code works but only if I have just added with INSERT, but I want to use it with SELECT. I also have a php part in combination with COUNT ROWS and then determine the highest record value. But I am looking for MYSQL query that counts and determines the last added record and select it. what solutions do you know? Edited June 3, 2016 by WesleyA Link to comment Share on other sites More sharing options...
WesleyA Posted June 3, 2016 Author Share Posted June 3, 2016 I googled it and found it. http://dev.mysql.com/doc/refman/5.7/en/example-maximum-row.html First google, then ask I should have known 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