how to set the primary key of a mysql-table automatically as value in other tables of the same db via php?
hi there, as being a newbie in this list, i don't know if my problem already has being solved. so here it is: i created a database containing 6 tables: 'main' got the key 'id_main' (integer auto_increment), every other table got the field 'id_main'(integer) too, to connect all of them. so, if I enter a new set of data via a php-form, the value $id_main is automatically given by mysql. but how do I tell the program to enter the same value $id_main in all of the other tables, because the value is given in mysql and not via php...? (maybe it would be better to automatically get the id of the last set and add 1. if someone got a script for this, i would be happy, too!) hopefully i was able to explain my question properly and someone got an answer. have a nice day! thanx cornelia
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]