diff options
author | Nathan Gass | 2020-09-03 11:51:34 +0200 |
---|---|---|
committer | Nathan Gass | 2020-09-03 11:51:34 +0200 |
commit | 39f42c7291101df7edf4f7880be5eba1e957c3b0 (patch) | |
tree | a2c5f0ecb27e2537e6b59a4497ee8288d0722934 | |
parent | eaa3fd96f13640462f06c5e66f1601a045cdb02a (diff) | |
download | itools-39f42c7291101df7edf4f7880be5eba1e957c3b0.tar.gz itools-39f42c7291101df7edf4f7880be5eba1e957c3b0.tar.bz2 itools-39f42c7291101df7edf4f7880be5eba1e957c3b0.zip |
escape uppercase field names for postgresql
-rw-r--r-- | it_dbi.class | 2 |
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) { |