Re: auto_increment in multiple tables...

2002-11-02 Thread Bhavin Vyas
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

Re: auto_increment in multiple tables...

2002-11-02 Thread Walter Lee Davis
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-