Hi everyone
I have a problem with the 's in some titles.
I have a discography site where all the songs have an ID number, a title and a version in a table.
I then have a list with all the songs in the different versions that links to a DiscographySong.php site with the ID number transfered in the link.
On this site I collect the info about the song like this:
$getsong=mysql_query("select * from DiscographySONG WHERE IDsong='$idsong' LIMIT 1");
while ($row = mysql_fetch_array($getsong)){
$title=$row['Title'];
$version=$row['Version'];
;}
This works fine, and I can use the info just fine.
But now the problem arrives.
I want it to find all the different versions of the song, so I get it to look for all the songs that has the same title like this :
$getsongs=mysql_query("select * from DiscographySONG WHERE `Title`= '$title' ");
while ($row = mysql_fetch_array($getsongs)){
This works just fine untill I click a song there has a ' in the title like all songs with Don't or Won't in the title.
Then it writes
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/home/web/web60269/DiscographySong.php on line 98
So for some reason when $title contains a ' it doesn't work.
What am I doing wrong ??
best
Michael