summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Gass2020-09-01 12:24:04 +0200
committerNathan Gass2020-09-01 12:24:04 +0200
commitdfc88cb95226ce20973c0d40e15d53b8950ec233 (patch)
tree17e441178c9eaf41682029156f22ad60fabe746b
parentb3f9e0aba3195e3a0c1af480a18eb685e42c3c4f (diff)
downloaditools-dfc88cb95226ce20973c0d40e15d53b8950ec233.tar.gz
itools-dfc88cb95226ce20973c0d40e15d53b8950ec233.tar.bz2
itools-dfc88cb95226ce20973c0d40e15d53b8950ec233.zip
generate postgres compatible where statements
-rw-r--r--it_dbi.class4
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;
}