I get the Artist info and Album info automatically with a script. So I want to be able to minimise the number of querys.
So in PHP I have the variables $artist, $album, $song, $file
I then want to do a 'INSERT INTO Artists SET Name=$artist'
and I want
some more in that SELECT that only adds it if it isn't already in there.
Then I need to get the ID for that artist so probably another select
unless there is a quicker way.
Then a similar INSERT for the Album, once again I need to get the Album ID so that I can use it in the last INSERT which actually inserts the Song.
This one is easy: "SELECT Songs.* FROM Songs, Albums, Artists WHERE Songs.AlbumID = Album.ID AND Album.ArtistID = Artist.ID AND Artist.Artist LIKE 'A%' "
Then I also need to be able to a SELECT of the following format although now it won't work as the database is different. SELECT * FROM Songs WHERE Artist LIKE "A%" How would I write that one?
More helpful?
Nicolas