mirror of https://github.com/Icinga/icinga2.git
parent
96626f4eca
commit
5e1182a5c7
|
@ -570,7 +570,14 @@ bool IdoMysqlConnection::FieldToEscapedString(const String& key, const Value& va
|
|||
} else if (DbValue::IsTimestampNow(value)) {
|
||||
*result = "NOW()";
|
||||
} else {
|
||||
*result = "'" + Escape(rawvalue) + "'";
|
||||
Value fvalue;
|
||||
|
||||
if (rawvalue.IsBoolean())
|
||||
fvalue = Convert::ToLong(rawvalue);
|
||||
else
|
||||
fvalue = rawvalue;
|
||||
|
||||
*result = "'" + Escape(fvalue) + "'";
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -564,7 +564,14 @@ bool IdoPgsqlConnection::FieldToEscapedString(const String& key, const Value& va
|
|||
} else if (DbValue::IsTimestampNow(value)) {
|
||||
*result = "NOW()";
|
||||
} else {
|
||||
*result = "E'" + Escape(rawvalue) + "'";
|
||||
Value fvalue;
|
||||
|
||||
if (rawvalue.IsBoolean())
|
||||
fvalue = Convert::ToLong(rawvalue);
|
||||
else
|
||||
fvalue = rawvalue;
|
||||
|
||||
*result = "E'" + Escape(fvalue) + "'";
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue