Sorry I found out about Last Insert_ID right after writing this. I guess the correct sequence is check manual then post to list ?
Stuart --- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > I'm in the midst of writing out some code that will > take data from a huge form and write it to the > database. > All the tables for insertions are innodb so i'm > going > (or trying too) with the "one stop shop" approach - > transactions. > > Question: > The first table I write too has as it's first column > an auto-inc int. This "recordID" will serve as the > recordID for all the other tables that will need > insertions. Meaning the same RecordID must go into > each other table. > I need to get that recordID first before continuing > along with the transaction. But, in my > understanding > (and I could be wrong) nothing gets written until > the > very end ? So how do I get the recordID into the > other tables. > > Right now - i do the insert into the first table > and > that is fine. I imagine , haven't worked it out > yet, > but following that insertion I need to do a "select > statement and in the application layer assign that > number to a variable. > > Anyway once again I"m running my mouth , so can > someone tell me if I'm right or wrong ? and if I'm > neither how I can go about keeping the transaction > as > one step. > > Thank you, > Stuart > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]