aleX_hill Posted March 4, 2010 Share Posted March 4, 2010 I have the following structure: id: autoincrement title email When I submit a title/email pair I want to get the auto-generated id. What is the best way of doing this? Quote Link to comment https://forums.phpfreaks.com/topic/194111-finding-id-of-last-inserted-item/ Share on other sites More sharing options...
salathe Posted March 4, 2010 Share Posted March 4, 2010 If you're using the mysql_* family of functions, have a stab at mysql_insert_id. Quote Link to comment https://forums.phpfreaks.com/topic/194111-finding-id-of-last-inserted-item/#findComment-1021321 Share on other sites More sharing options...
aleX_hill Posted March 5, 2010 Author Share Posted March 5, 2010 That was easy... Thanks Quote Link to comment https://forums.phpfreaks.com/topic/194111-finding-id-of-last-inserted-item/#findComment-1021776 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.