diff options
author | Christian Schneider | 2018-07-10 17:01:57 +0200 |
---|---|---|
committer | Christian Schneider | 2018-07-10 17:09:37 +0200 |
commit | 96b3a802ebce50be52886317645cfa7a943603f9 (patch) | |
tree | df129e8bba4a9b28ecec67a00997f4bf90bcc4f2 /it_dbi.class | |
parent | 9211a26f96dda5dbf5d2f59656a246a2ac5370e5 (diff) | |
download | itools-96b3a802ebce50be52886317645cfa7a943603f9.tar.gz itools-96b3a802ebce50be52886317645cfa7a943603f9.tar.bz2 itools-96b3a802ebce50be52886317645cfa7a943603f9.zip |
Use a little bit less magic code to replace leading single-quote by json path prefix
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class index 2b0e782..a6b7eee 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -269,7 +269,7 @@ function _set($tags, $allfields = false) } if ($dyns) - $result[] = "dyncols = IF(dyncols IS NULL, JSON_OBJECT(" . join(", ", (array)$dyns) . "), JSON_SET(dyncols, ". join(", ", it::map('"\'$." . substr($v, 1)', $dyns)) ."))"; + $result[] = "dyncols = IF(dyncols IS NULL, JSON_OBJECT(" . join(", ", (array)$dyns) . "), JSON_SET(dyncols, ". join(", ", it::replace(["^'" => "'$."], $dyns)) ."))"; return $result ? 'SET ' . implode(', ', $result) : ''; } |