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