tibberous Posted January 17, 2009 Share Posted January 17, 2009 I have a table that sets the order number to the row id + 'P'. If I insert a record, can I refer to the auto-incrementing row id during the insert somehow? get_last_id doesn't seem to work. Link to comment https://forums.phpfreaks.com/topic/141264-way-to-refer-to-auto-incrementing-id-in-an-insert/ Share on other sites More sharing options...
DeanWhitehouse Posted January 18, 2009 Share Posted January 18, 2009 Use a query to get the id Link to comment https://forums.phpfreaks.com/topic/141264-way-to-refer-to-auto-incrementing-id-in-an-insert/#findComment-739394 Share on other sites More sharing options...
dawsba Posted January 18, 2009 Share Posted January 18, 2009 $last_id = mysql_insert_id(); Link to comment https://forums.phpfreaks.com/topic/141264-way-to-refer-to-auto-incrementing-id-in-an-insert/#findComment-739415 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.