This is more SQL than PHP, how did you create your constraints? Did you set insert on CASCADE?
-----Mensagem original----- De: Nasreen Laghari [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 25 de fevereiro de 2008 22:15 Para: email@example.com Assunto: [PHP-DB] INSERT query with Primary and foreign key Hi, I need help to insert date into two tables when tables have primary and foreign key relationship using php. I tried simple INSERT query but foreign key colum is storing NULL. Regards Nasreen ____________________________________________________________________________ ________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php