The function qStr()
takes an input string, and allows it to be:
$dontFixQuotes
stops any internal quoting happening, This parameter was mostly used in older versions of PHP when the now removed magic_quotes
parameter was enabled, and the 2 methods were in conflict. $string = "Patrick O'Reilly"; $SQL = "SELECT * FROM names WHERE name='$string'"; $result = $db->Execute($SQL); /* * Execution fails due to mismatched ` characters */ $qString = $db->qStr($string); /* * function returns 'Patrick O\'Reilly' (The resulting string is database-specific) */ $SQL = "SELECT * FROM names WHERE name=$qString"; $result = $db->Execute($SQL); /* * Execution Succeeds */