diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-11-16 00:06:20 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-11-16 00:06:20 +0100 |
commit | 10ecc84a3215ca02c11855e399a211f4e5cb60b1 (patch) | |
tree | e5f55ee7d390007743cfa5b353f98aac18b47d00 /system/database/drivers/mysql/mysql_result.php | |
parent | ef758bd67c45eb63485fbd2ea2b1d24aa2db1104 (diff) |
Improve DB field_data() for MySQL and CUBRID
Diffstat (limited to 'system/database/drivers/mysql/mysql_result.php')
-rw-r--r-- | system/database/drivers/mysql/mysql_result.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index 4bfa0ae35..a6dcde4e7 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -115,8 +115,7 @@ class CI_DB_mysql_result extends CI_DB_result { $retval[$i]->name = mysql_field_name($this->result_id, $i); $retval[$i]->type = mysql_field_type($this->result_id, $i); $retval[$i]->max_length = mysql_field_len($this->result_id, $i); - $retval[$i]->primary_key = (strpos(mysql_field_flags($this->result_id, $i), 'primary_key') === FALSE) ? 0 : 1; - $retval[$i]->default = ''; + $retval[$i]->primary_key = (int) (strpos(mysql_field_flags($this->result_id, $i), 'primary_key') !== FALSE); } return $retval; |