I have a php variable "$song" that is already formatted like this: "Artist - Title".
I need to search for a matching record within a database that stores the artist and titles in seperate columns. To do this, I created this query:
"SELECT s.id, s.artist, s.title, s.picture, s.buycd, s.label, s.composer, s.rating, s.numvotes, s.duration, s.date_played FROM songlist s WHERE ((s.artist & ' - ' & s.title) = '$song') LIMIT 0,1"
The problem is that instead of pulling the correct record, it just pulls the first record in the table. What is the correct way to write this?