multiple inserts

From: Date: Sat, 20 Apr 2002 21:58:21 +0000
Subject: multiple inserts
Groups: php.db 
Request: Send a blank email to php-db+get-18701@lists.php.net to get a copy of this message
I have the following insert : mysql_connect( "localhost", "xxxx", "xxxx" ); mysql_select_db( "xxxx" ); mysql_query("INSERT INTO music_album VALUES (NULL, '$artist_id' ,'$album' ,NULL ,NULL)"); mysql_query("INSERT INTO music_songs VALUES (NULL ,NULL ,NULL ,NULL ,'$songname' ,'$lyrics')"); When I run this, the first insert works alright but the second insert does nothing. What am I doing wrong ? How do I do a mysql_insert_id()?

« previous php.db (#18701) next »