mysql_query("SELECT ........where description='$desc[0]');
Your query needs a closing speech mark - however I'm guessing you have that in the original code...
Try changing the query to:
mysql_query("SELECT ........where description='" . addsalshes($desc[0]) . "'");
This will automaticaly add escape characters to anything that may mess up your query (such as apostrophes).