diff options
author | Andrey Andreev <narf@devilix.net> | 2017-09-13 12:17:28 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2017-09-13 12:17:28 +0200 |
commit | 9385cfed8e61c4568d5ec93c8ee8900f314a5a5a (patch) | |
tree | 0bdc724225634db408004d575cb52f90c4cc9a8a /system/database/drivers/mysqli/mysqli_utility.php | |
parent | 146b131dab454885bf7ae943a93ecab53333520a (diff) |
Fix #5260
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_utility.php')
-rw-r--r-- | system/database/drivers/mysqli/mysqli_utility.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/system/database/drivers/mysqli/mysqli_utility.php b/system/database/drivers/mysqli/mysqli_utility.php index 4a3dad4d1..1699b611f 100644 --- a/system/database/drivers/mysqli/mysqli_utility.php +++ b/system/database/drivers/mysqli/mysqli_utility.php @@ -155,9 +155,11 @@ class CI_DB_mysqli_utility extends CI_DB_utility { while ($field = $query->result_id->fetch_field()) { // Most versions of MySQL store timestamp as a string - $is_int[$i] = in_array(strtolower($field->type), - array('tinyint', 'smallint', 'mediumint', 'int', 'bigint'), //, 'timestamp'), - TRUE); + $is_int[$i] = ($field->type & MYSQLI_TYPE_TINY) + OR ($field->type & MYSQLI_TYPE_SHORT) + OR ($field->type & MYSQLI_TYPE_INT24) + OR ($field->type & MYSQLI_TYPE_LONG) + OR ($field->type & MYSQLI_TYPE_LONGLONG); // Create a string of field names $field_str .= $this->db->escape_identifiers($field->name).', '; |