hi all
i m tryin to get last_id from an insert statement in JRDC2
can i use this mysql function :
LAST_INSERT_ID()
INSERT INTO foo (auto,text)
VALUES(NULL,'text'); # generate ID by inserting NULL
INSERT INTO foo2 (id,text)
VALUES(LAST_INSERT_ID(),'text'); # use ID in second table
Yes. I just did some checking and you can safely use it as long as the second command with the LAST_INSERT_ID is sent together with the first one, in the same batch.