MySQL Forums
Forum List  »  PHP

Re: How to insert record to a table and simultaneously update the bridge table?
Posted by: Peter Brawley
Date: January 17, 2014 09:48PM

Where table c bridges tables a & b, any row in c must references the PK of a and the PK of b, so those rows in a & b must exist before they can be referenced in c.

If a & b use auto_increment PKs, the function last_intert_id() retrieves the most recent auto_increment assigned in the current mysql connection.



Edited 1 time(s). Last edit at 01/18/2014 10:35PM by Peter Brawley.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.