using qstr (quoting of strings) from ADOdb 5.11, it might fix problems reported by Anthony Messina

This commit is contained in:
Ralf Becker 2010-09-11 07:47:40 +00:00
parent c5f77ca982
commit caf6d694c2

View File

@ -253,16 +253,20 @@ select viewname,'V' from pg_views where viewname like $mask";
return $ret;
}
/*
// if magic quotes disabled, use pg_escape_string()
function qstr($s,$magic_quotes=false)
{
if (is_bool($s)) return $s ? 'true' : 'false';
if (!$magic_quotes) {
if (ADODB_PHPVER >= 0x5200) {
return "'".pg_escape_string($this->_connectionID,$s)."'";
}
if (ADODB_PHPVER >= 0x4200) {
return "'".pg_escape_string($s)."'";
}
if ($this->replaceQuote[0] == '\\'){
$s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s);
$s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\\000"),$s);
}
return "'".str_replace("'",$this->replaceQuote,$s)."'";
}
@ -271,7 +275,6 @@ select viewname,'V' from pg_views where viewname like $mask";
$s = str_replace('\\"','"',$s);
return "'$s'";
}
*/
// Format date column in sql string given an input format that understands Y M D