$name = addslashes($name);
$sql = "SELECT mcats_id FROM MBR__CLASSIFIED_ADVT__TYPE__SUB WHERE mcats_type = '$name' AND mcat_id = '$cat_primary'";
$res = odbc_exec($odbc_ptr, $sql);
addslashes() doesn't seem to do the trick. The field is actually labeled SUV's and therefore I cannot strip the single quote otherwise the search will fail.
How do I escape the SQL query so I may include the 's in the query?
Two single quotes sounds like the suggested solution -- although I tried ''$title'' and it still didn't do the trick my DBA made some changes and all seems to work for now.