summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mysql.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/mysql.php b/lib/mysql.php
index 527ba3b..f93c9cd 100644
--- a/lib/mysql.php
+++ b/lib/mysql.php
@@ -407,7 +407,16 @@ namespace {
return false;
// @codeCoverageIgnoreEnd
}
- return mysqli_fetch_field($result);
+ $res = mysqli_fetch_field($result);
+ $res->not_null = ($res->flags & MYSQLI_NOT_NULL_FLAG) ? 1 : 0;
+ $res->primary_key = ($res->flags & MYSQLI_PRI_KEY_FLAG ) ? 1 : 0;
+ $res->unique_key = ($res->flags & MYSQLI_UNIQUE_KEY_FLAG ) ? 1 : 0;
+ $res->multiple_key = ($res->flags & MYSQLI_MULTIPLE_KEY_FLAG ) ? 1 : 0;
+ $res->numeric = ($res->flags & MYSQLI_NUM_FLAG ) ? 1 : 0;
+ $res->blob = ($res->flags & MYSQLI_BLOB_FLAG ) ? 1 : 0;
+ $res->unsigned = ($res->flags & MYSQLI_UNSIGNED_FLAG ) ? 1 : 0;
+ $res->zerofill = ($res->flags & MYSQLI_ZEROFILL_FLAG ) ? 1 : 0;
+ return $res;
}
function mysql_field_seek($result, $field)