This is a discussion on fetch_fields, flags and mysqli within the PHP Language forums, part of the PHP Programming Forums category; Using mysqli, I'm trying to get meaningful info out of the 'flags' item when running 'fetch_fields': //code $query = 'select * ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Using mysqli, I'm trying to get meaningful info out of the 'flags'
item when running 'fetch_fields': //code $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; } $result->close(); } $mysqli->close(); //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? Hughie |