#620516 by Crell: Use isNull() inside SQLite driver.

merge-requests/26/head
Angie Byron 2009-11-02 00:19:27 +00:00
parent 267c290cf5
commit bbf9c0a674
1 changed files with 3 additions and 6 deletions

View File

@ -92,18 +92,15 @@ class UpdateQuery_sqlite extends UpdateQuery {
if (is_array($data)) {
// The field is an expression.
$condition->condition($field, $data['expression'], '<>');
// The IS NULL operator is badly managed by DatabaseCondition.
$condition->where($field . ' IS NULL');
$condition->isNull($field);
}
elseif (is_null($data)) {
// The field will be set to NULL.
// The IS NULL operator is badly managed by DatabaseCondition.
$condition->where($field . ' IS NOT NULL');
$condition->isNull($field);
}
else {
$condition->condition($field, $data, '<>');
// The IS NULL operator is badly managed by DatabaseCondition.
$condition->where($field . ' IS NULL');
$condition->isNull($field);
}
}
if (count($condition)) {