I have a database entry that looks like this: Tim's Nasty Test !@#$%^&*()_-+=~`'":;{}[]|?>.<,\/ I need to be able to select it. Here is my php code. my test string with all the bad characters is in $request_parts[2] $db->GetRow("SELECT * FROM `{$table}` WHERE `TITLE` = '{$request_parts[2]}'"); Code (markup): Any ideas?
Thanks, but I found a solution: I used mysql_real_escape_string like this: $rdata = $db->GetRow("SELECT * FROM `{$tables}` WHERE `TITLE` = '".mysql_real_escape_string($request_parts[2])."'"); Code (markup):