bennyboywonder Posted March 7, 2007 Share Posted March 7, 2007 currently I use the SQL statement $query = "INSERT INTO items (user, refId, itemType, itemName) VALUES ('$sessUser', $maincat, 4, '$name')"; to add certain items to my database. In this table, their is an auto_incrementing primary key. Is their a way of having this same sql statement also return the primary key for the row that the data is placed into? Link to comment https://forums.phpfreaks.com/topic/41605-solved-getting-auto_incremented-id/ Share on other sites More sharing options...
bennyboywonder Posted March 7, 2007 Author Share Posted March 7, 2007 never mind. found it... Link to comment https://forums.phpfreaks.com/topic/41605-solved-getting-auto_incremented-id/#findComment-201586 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.