mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-09-30 21:29:00 +02:00
Merge pull request #32 from torleif/patch-2
FIX PostgreSQL filter on non text fields - on branch 1.1
This commit is contained in:
commit
18fdae9d90
@ -2108,6 +2108,7 @@ class PostgreSQLDatabase extends SS_Database {
|
|||||||
} else {
|
} else {
|
||||||
$comp = ($caseSensitive === true) ? 'LIKE' : 'ILIKE';
|
$comp = ($caseSensitive === true) ? 'LIKE' : 'ILIKE';
|
||||||
if($negate) $comp = 'NOT ' . $comp;
|
if($negate) $comp = 'NOT ' . $comp;
|
||||||
|
$field.='::text';
|
||||||
}
|
}
|
||||||
|
|
||||||
return sprintf("%s %s '%s'", $field, $comp, $value);
|
return sprintf("%s %s '%s'", $field, $comp, $value);
|
||||||
|
Loading…
Reference in New Issue
Block a user