diff options
| author | Christian Weber | 2009-08-08 17:56:03 +0000 | 
|---|---|---|
| committer | Christian Weber | 2009-08-08 17:56:03 +0000 | 
| commit | b6444754507321571e8c06c91d50d56265c104ba (patch) | |
| tree | d77afaf0a9945c0beee9c0cbceb63113a82af0d7 /it_dbi.class | |
| parent | 0ce1010d26e4c22cda2f3576ea45e3564119d004 (diff) | |
| download | itools-b6444754507321571e8c06c91d50d56265c104ba.tar.gz itools-b6444754507321571e8c06c91d50d56265c104ba.tar.bz2 itools-b6444754507321571e8c06c91d50d56265c104ba.zip  | |
correct integer detection (bigint is still treated as string as it exceeds php's int size)
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 cd2af98..43b33b0 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -714,7 +714,7 @@ function _get_field_info()  		for ($res = $this->query('SHOW COLUMNS FROM ' . $this->_p['table']); $res && ($field = mysql_fetch_assoc($res)); )  		{  			$this->_fields[$field['Field']] = $field + array('Length' => preg_match('/date|time/', $field['Type']) ? 20 : intval(it::match('\d+', $field['Type']))); -			$this->_isint[$field['Field']] = $field['Type'] == "int(11)"; +			$this->_isint[$field['Field']] = preg_match('/^(tiny|small|medium|)int/', $field['Type']);  		}  		$state['fields'][$this->_p['table']] = $this->_fields;  |