summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
authorChristian Schneider2020-07-01 16:33:03 +0200
committerChristian Schneider2020-07-01 16:33:03 +0200
commit083296d689e4a40dc0bebb0a6f69c8342d6d3a2e (patch)
treed9a73c78d744bc474b246ceefc6b96c58d2e96d8 /it_dbi.class
parent007ed5dbc6aac41ecbf020484b4ccf401f2a86fc (diff)
downloaditools-083296d689e4a40dc0bebb0a6f69c8342d6d3a2e.tar.gz
itools-083296d689e4a40dc0bebb0a6f69c8342d6d3a2e.tar.bz2
itools-083296d689e4a40dc0bebb0a6f69c8342d6d3a2e.zip
Preserve type when writing int to dyncols
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class4
1 files changed, 3 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 00d5c99..7223904 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -269,11 +269,13 @@ function _set($tags, $force = false)
{
if (is_null($value))
$deldyns[] = "'\$.$f'";
+ if (is_int($value))
+ $newdyns[] = "'\$.$f', $value";
else
$newdyns[] = "'\$.$f', " . $this->escape_string($value);
}
- $alldyns[] = $this->escape_string($f) . ", " . (substr($field, 0, 1) === "-" ? $value : $this->escape_string($value));
+ $alldyns[] = $this->escape_string($f) . ", " . (substr($field, 0, 1) === "-" || is_int($value) ? $value : $this->escape_string($value));
$dyndata[$f] = $value;
}
else if (substr($field, 0, 1) === '-') # Unquoted value (always added)