summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Gass2020-09-03 11:51:34 +0200
committerNathan Gass2020-09-03 11:51:34 +0200
commit39f42c7291101df7edf4f7880be5eba1e957c3b0 (patch)
treea2c5f0ecb27e2537e6b59a4497ee8288d0722934
parenteaa3fd96f13640462f06c5e66f1601a045cdb02a (diff)
downloaditools-39f42c7291101df7edf4f7880be5eba1e957c3b0.tar.gz
itools-39f42c7291101df7edf4f7880be5eba1e957c3b0.tar.bz2
itools-39f42c7291101df7edf4f7880be5eba1e957c3b0.zip
escape uppercase field names for postgresql
-rw-r--r--it_dbi.class2
1 files changed, 2 insertions, 0 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 316f3ca..79c3e03 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -413,6 +413,8 @@ function _where($params)
if ($dyncols_enabled && $this->_fields['dyncols'] && !$this->_fields[$field] && strpos($field, '(') === false)
$field = $this->_json_extract('dyncols', $field);
+ else if (it::match('^\w*[A-Z]\w+$', $field, 'casesensitive' => 1))
+ $field = $this->escape_name($field);
switch ($op)
{