Yes, you will have to grab the userid and insert it into student table,
Mysql has no concept of dependent keys (in 3.23.xx).
You can write a perl or php application to do that.
Regards,
Bhavin.
- Original Message -
From: "João Borsoi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Satur
Are you using PHP? There is a useful function in there that would give
you the last auto-number, like this:
(do your first insert)
$insert_key = mysql_insert_id();
(do your second insert, using $insert_key as the new foreign key that
you are putting in your SQL)
Now each table has its own auto-