diff options
author | Nathan Gass | 2020-09-01 12:24:04 +0200 |
---|---|---|
committer | Nathan Gass | 2020-09-01 12:24:04 +0200 |
commit | dfc88cb95226ce20973c0d40e15d53b8950ec233 (patch) | |
tree | 17e441178c9eaf41682029156f22ad60fabe746b /it_dbi.class | |
parent | b3f9e0aba3195e3a0c1af480a18eb685e42c3c4f (diff) | |
download | itools-dfc88cb95226ce20973c0d40e15d53b8950ec233.tar.gz itools-dfc88cb95226ce20973c0d40e15d53b8950ec233.tar.bz2 itools-dfc88cb95226ce20973c0d40e15d53b8950ec233.zip |
generate postgres compatible where statements
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_dbi.class b/it_dbi.class index b3fd80b..dd0fb14 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -426,7 +426,7 @@ function _where($params) $query .= $sep . "$field IS NOT NULL AND (" . join(" OR ", $parts) . ")"; # Check for IS NOT NULL to take advantage of index } else - $query .= $sep . "1"; + $query .= $sep . "TRUE"; break; case 'MATCH': @@ -448,7 +448,7 @@ function _where($params) $query .= "$sep$field $op (" . join(",", $qvals) . ")"; # null is mapped to '' } else - $query .= $sep . (($op == 'IN') ? "0" : "1"); + $query .= $sep . (($op == 'IN') ? "FALSE" : "TRUE"); break; } |