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? 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. 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! 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
Archived
This topic is now archived and is closed to further replies.