From ddbe04f2924cfc6e3a00fd8df57d3ed14cff71fa Mon Sep 17 00:00:00 2001 From: David Flatz Date: Thu, 25 Oct 2018 18:28:47 +0200 Subject: don't do JSON_EXTRACT when we use SQL functions with dyncols --- it_dbi.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it_dbi.class') diff --git a/it_dbi.class b/it_dbi.class index 76f4d1a..d3dbc11 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -383,7 +383,7 @@ function _where($params) $qval = $this->escape_string((string)$value); } - if ($dyncols_enabled && $this->_fields['dyncols'] && !$this->_fields[$field]) + if ($dyncols_enabled && $this->_fields['dyncols'] && !$this->_fields[$field] && strpos($field, '(') === false) $field = "JSON_EXTRACT(dyncols, " . $this->escape_string('$.' . $field) . ")"; switch ($op) -- cgit v1.2.3