Outline: I'm trying to get the results from a MySQL database & display them. Just using FROM `books` WHERE image_by LIKE '%".$_GET ['artistID')."%' AND (books.Image_Sml != '/images/thumbs/NoImage_th.jpg' )"; Will not differentiate between <a href="http://site1.biz/'>name1</a> and <a href="http://site2.com/'>name2</a> Gives me erroneous results, but works if the returned value is not an URL SO I searched through the forum& figured that I needed to use htmlspecialchars as per below NOW I get no results returned at all $linkID = mysql_connect('localhost', 'Lida', 'ttb1lq') or die( "Error, database not accessing!"); mysql_select_db('twihjlight',$linkID); $query = "SELECT books.Id, books.Titles, books.image_by, books.Image_Sml FROM `books` WHERE image_by LIKE '%".htmlspecialchars($_GET ['artistID'])."%' AND (books.Image_Sml != '/images/thumbs/NoImage_th.jpg' )"; if(! $result = mysql_query($query, $linkID)) echo mysql_error($linkID); //cry if the query fails