fetch_fields, flags and mysqli

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 * ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-07-2007
hughie
 
Posts: n/a
Default fetch_fields, flags and mysqli

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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:17 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0