diff options
author | Christian Schneider | 2007-11-28 17:54:08 +0000 |
---|---|---|
committer | Christian Schneider | 2007-11-28 17:54:08 +0000 |
commit | bcfedeeba1b0a06901e56a4f8987e82a0b30cc4a (patch) | |
tree | 6e60115000934d023e521198343bd7eb0e1e6b0d /it_dbi.class | |
parent | ecb00403de3250014d4a8a1070506fc0577e9ec9 (diff) | |
download | itools-bcfedeeba1b0a06901e56a4f8987e82a0b30cc4a.tar.gz itools-bcfedeeba1b0a06901e56a4f8987e82a0b30cc4a.tar.bz2 itools-bcfedeeba1b0a06901e56a4f8987e82a0b30cc4a.zip |
New it_dbi type awareness: int(11) fields are returned as int
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/it_dbi.class b/it_dbi.class index bc640b3..b2c78ef 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -491,11 +491,11 @@ function iterate() { if ($this->_data = mysql_fetch_assoc($this->_result)) { + foreach ($this->_data as $field => $value) + $this->$field = ($this->_fields[$field]['Type'] == 'int(11)') ? ($this->_data[$field] = intval($value)) : $value; + if (!empty($this->_p['keyfield'])) $this->_key = $this->_data[$this->_p['keyfield']]; - - foreach ($this->_data as $field => $value) - $this->$field = $value; } else $this->clear(false); |