thanks @hackattack, who found this? answered already in another place .
BEGIN INSERT INTO users (username, password) VALUES('test', 'test') INSERT INTO profiles (userid, bio, homepage) VALUES(LAST_INSERT_ID(),'Hello world!', 'http://www.stackoverflow.com'); COMMIT;
BUT ALAS - it didn't work. The MySQL 5 link shows a slightly different syntax:
INSERT INTO `table2` (`description`) VALUES('sdfsdf');
And, lo / behold - it works!
More problems to come. Although the request will succeed in phpMyAdmin, my PHP installation complains about the request and throws a syntax error. I resorted to this php-way and made 2 separate requests and used mysql_insert_id()
I find this annoying, but I think there is not much less server load than a transaction.
source share