diff options
author | Nathan Gass | 2021-01-27 12:29:59 +0100 |
---|---|---|
committer | Nathan Gass | 2023-02-28 10:59:15 +0100 |
commit | efeb9c4a97668672f8aaa263e4937461f0b1b725 (patch) | |
tree | acb348f5d676486ebe1117547e1c2fe99d854e31 /it_dbi.class | |
parent | 9ba6dd60b3f0887bb321e248deb701bedf273bc7 (diff) | |
download | itools-efeb9c4a97668672f8aaa263e4937461f0b1b725.tar.gz itools-efeb9c4a97668672f8aaa263e4937461f0b1b725.tar.bz2 itools-efeb9c4a97668672f8aaa263e4937461f0b1b725.zip |
special handling of boolean columns (accept false as value without warning)
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/it_dbi.class b/it_dbi.class index c9cef54..6e34002 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -956,6 +956,11 @@ function _get_field_info() $this->_convertfunc[$name] = $field['_convertfunc']; $this->_escapefunc[$name] = $field['_escapefunc']; } + else if ($field['Type'] == 'tinyint(1)') + { + $this->_convertfunc[$name] = 'boolval'; + $this->_escapefunc[$name] = 'it_dbi::escape_bool'; + } else if (preg_match('/^(tiny|small|medium|)int|^float|^double$/', $field['Type'])) $this->_convertfunc[$name] = it::match('int', $field['Type']) ? "intval" : "floatval"; } |