dadamssg Posted November 21, 2010 Share Posted November 21, 2010 Isn't there a way to get the last record entered into a table? I have a blog post that i enter into a table and then once that happens i want to redirect them to that blog but i need to get the id of that entry. Is it necessary for me to enter a datetime field in the table to do this? Quote Link to comment https://forums.phpfreaks.com/topic/219327-get-last-record-that-was-inserted/ Share on other sites More sharing options...
Pikachu2000 Posted November 21, 2010 Share Posted November 21, 2010 mysql_insert_id(), as long as the table has an autoincrement id field. Quote Link to comment https://forums.phpfreaks.com/topic/219327-get-last-record-that-was-inserted/#findComment-1137304 Share on other sites More sharing options...
dadamssg Posted November 21, 2010 Author Share Posted November 21, 2010 perfect. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/219327-get-last-record-that-was-inserted/#findComment-1137307 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.