php explode, foreign characters leak through
Posted: Fri Aug 14, 2009 9:39 pm
I have a simple search engine and I'm trying to detect certain words in a string with something like this:
but somehow anything in the database that is a foreign character or html symbol like "»" seems to find its way into the results even if the title doesn't contain the $search phrase. Does anyone know a method to strip all those things from the text before it gets to my query? Any help would be appreciated. Thanks.
Code: Select all
$sql = "SELECT * FROM table_links WHERE title like('%" . $search . "%')";