MySQL LEFT JOIN is not working

Saturday, May 3, 2014

I have two MySQL tables:


tbsongs:


enter image description here


tbalbums:


enter image description here


I am trying to make a query from tbsongs to add a field from tbalbums, but I am getting an error, and don't find where is the error.


Here you have my query:



$rs = mysql_query("SELECT * FROM tbsongs where tbsongs.index='$id'
LEFT JOIN tbalbums AS nombreAlbum ON tbsongs.album = tbalbums.idAlbums ORDER BY titulo asc");






http://ift.tt/1iQin07