From: "James Black"
> Basically,  I want to store a user in one table, then get the id for the
> user I just saved, and store three more rows, each in a different
> database, using the user's id in the insert statements.

I don't think it can be done with a single statement, but you actually don't
need to do it in one query.
After you inserted the data in the user table (which has an auto-increment
field for the id) you can retrieve the id (LAST_INSERT_ID()) and use that as
the id in the other tables/databases. Using a single source to create the id
assures you that other processes will not get the same user id.

Regards, Jigal.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to