I have to get last insert id from a specific inserted table?. Lets say i have this code:
INSERT INTO blahblah (test1, test 2) VALUES ('test1', 'test2');
INSERT INTO blahblah2 (test1, test 2) VALUES ('test1', 'test2');
INSERT INTO blahblah3 (test1, test 2, lastid) VALUES ('test1', 'test2', last id of blahblah);
How do i get the insert id of table blahblah in table blahblah3? LAST_INSERT_ID() only gives you the last insert id
Regards, Simon :)
INSERT INTO blahblah2
and theINSERT INTO blahblah3
line would do the trick. – Clitoris