Guys, I've written a really quick and rather crappy script which compares two tables. It does this because my content management system on www.coolsmartphone.com puts news stories in one table, but the commenting system uses another table. Anyhoo, I wrote a script that compares the two fields in two tables and fires out the result as a URL, so that users can click the appropriate link. All is well until I enter a news item with a subject like "It's here" or "That's the way to do it" etc etc - you get the picture. Although the "LIKE" command in MySQL is doing it's job, the "mysql_result($leigh2, 0);" isn't working when a -- ' -- is in the subject line. How do I get it to select it and IGNORE that ? The -- ' -- symbol can't be changed in the database, so I need some way of saying, "grab this field as a whole". Here's the script. Yes, crap.. yes, there's probably a neater way of doing it.. but I was drunk at the time I wrote it.. :) <?php $titlenew = htmlspecialchars("$title[$i]"); $leigh="SELECT * from phpbb_topics where topic_title LIKE '$titlenew'"; $leigh2=mysql_query($leigh) or die("Could not select it"); $leigh3=mysql_fetch_array($leigh2); $thelinky=mysql_result($leigh2, 0); $thecounter=mysql_result($leigh2, 0, 6); if(!$leigh3) { echo "No link yet"; } else { print "<a href=\"http://www.coolsmartphone.com/forum/posting.php?mode=reply&t=$thelinky\"><B>Add</a></b> or <a href=\"http://www.coolsmartphone.com/forum/viewtopic.php?t=$thelinky\"><B>view comments ($thecounter)</a></b>"; } ?>