mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-10 08:47:46 +02:00
some more PostgreSQL stuff from ADOdb 5.11
This commit is contained in:
@ -152,7 +152,7 @@ WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
|
||||
Using a OID as a unique identifier is not generally wise.
|
||||
Unless you are very careful, you might end up with a tuple having
|
||||
a different OID if a database must be reloaded. */
|
||||
function _insertid($table,$column,$try_oid=true)
|
||||
function _insertid($table,$column,$try_oid=false)
|
||||
{
|
||||
if ($try_oid)
|
||||
{
|
||||
@ -257,20 +257,20 @@ select viewname,'V' from pg_views where viewname like $mask";
|
||||
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('\\\\',"\\\\000"),$s);
|
||||
}
|
||||
return "'".str_replace("'",$this->replaceQuote,$s)."'";
|
||||
return "'".str_replace("'",$this->replaceQuote,$s)."'";
|
||||
}
|
||||
|
||||
|
||||
// undo magic quotes for "
|
||||
$s = str_replace('\\"','"',$s);
|
||||
return "'$s'";
|
||||
|
Reference in New Issue
Block a user