dlf1987 Posted August 28, 2008 Share Posted August 28, 2008 i have 2 mysql inserts triggered in a row, and i want the second insert to put the unique id from the first insert into the second. How would i go about doing that? Link to comment https://forums.phpfreaks.com/topic/121746-solved-pull-amp-insert-unique-id-from-mysql/ Share on other sites More sharing options...
BlueSkyIS Posted August 28, 2008 Share Posted August 28, 2008 after the first insert, use $ins_id = mysql_insert_id(); to get the id of that record, then use that for the second insert. Link to comment https://forums.phpfreaks.com/topic/121746-solved-pull-amp-insert-unique-id-from-mysql/#findComment-628069 Share on other sites More sharing options...
dlf1987 Posted August 28, 2008 Author Share Posted August 28, 2008 Thanks alot! Link to comment https://forums.phpfreaks.com/topic/121746-solved-pull-amp-insert-unique-id-from-mysql/#findComment-628080 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.