fetch_fields, flags and mysqli

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Using mysqli, I'm trying to get meaningful info out of the 'flags'
item when running 'fetch_fields':

$query = 'select * from table1 where id = 1';

if ($result = $mysqli->query($query)) {
  $row = $result->fetch_assoc();

   /* Get field information for all columns */
   $finfo = $result->fetch_fields();

  foreach ($finfo as $val) {
    echo 'name: '.$val->name;
    echo ', max len: '.$val->max_length;
    echo ', flags: '.$val->flags;

//end code

Using non mysqli one can use mysql_field_flags as in
http://www.php.net/mysql_field_flags .
How can this be done using mysqli?


Site Timeline