could you provide the table schema please?
after all (apart from the fact that you may have conflicts with the
autoincrement of the id row) your table is not normalized! create
separate tables for albums *and* songs (and ...):
music_albums
album_songs
artists
album_artist (table resolving the n:n relationship between music_albums
and artists: one artist may play on several albums as well as one album
may be recorded by more than one artist e.g. samplers)
etc.
steff
Barry Rumsey wrote:
> 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()?
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php