1BEGIN;
2INSERT INTO users (username, password)
3 VALUES('test', 'test');
4INSERT INTO profiles (userid, bio, homepage)
5 VALUES(LAST_INSERT_ID(),'Hello world!', 'http://www.stackoverflow.com');
6COMMIT;
7
1BEGIN;
2INSERT INTO users (username, password)
3 VALUES('test', 'test');
4INSERT INTO profiles (userid, bio, homepage)
5 VALUES(LAST_INSERT_ID(),'Hello world!', 'http://www.stackoverflow.com');
6COMMIT;