OK, finally nailed the quoting of wierd strings issue.

This commit is contained in:
Andrew McMillan 2010-03-22 17:00:42 -07:00
parent 4b7ba370ad
commit 9a0a2c0e91

View File

@ -227,12 +227,11 @@ class AwlDBDialect {
$rv = $value;
break;
case PDO::PARAM_BOOL:
$rv = $value ? 'TRUE' : 'FALSE';
$rv = ($value ? 'TRUE' : 'FALSE');
break;
case PDO::PARAM_STR:
default:
$rv = str_replace("'", "''", $value);
$rv = "'".str_replace('\\', '\\\\\\', $rv)."'";
$rv = "'".str_replace("'", "''", str_replace('\\', '\\x5c', $value))."'";
if ( $this->dialect == 'pgsql' && strpos( $rv, '\\' ) !== false ) {
/** PostgreSQL wants to know when a string might contain escapes */