summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/drivers/DB_mysqli.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/drivers/DB_mysqli.php b/system/drivers/DB_mysqli.php
index fadcdd3c4..8bea60444 100644
--- a/system/drivers/DB_mysqli.php
+++ b/system/drivers/DB_mysqli.php
@@ -451,7 +451,7 @@ class CI_DB_mysqli_result extends CI_DB_result {
$F->type = $field->type;
$F->default = $field->def;
$F->max_length = $field->max_length;
- $F->primary_key = 0;
+ $F->primary_key = ($field->flags & MYSQLI_PRI_KEY_FLAG) ? 1 : 0;
$retval[] = $F;
}