fetch_desc();

Returns a reference to a row of query results and a reference to a corresponding row of datatypes for the query results.

The function should be called as follows:

To return column names and dataytpes:

($column_name, $datatypes) = $dbh->fetch_desc();

To return only column names:

($column_name) = $dbh->fetch_desc(); 

A datatype is information about what kind of data a particular value is. For example, Hello is a string, and is represented by a Char datatype. 0 could be a Number, but it could also be a False value for a Boolean datatype.

If you fetch only column-description records and ignore the datatypes, the array of values might look like the following:

application  comment  startup  max_file_size

By fetching the datatype information in addition to the column values, the array of values might look like the following:

application  comment  startup  max_file_size
          3        3        1              2

A row of datatype is defined the same way as a row of column descriptions:{ val[0], val[1], ...,val[NUM_OF_FIELDS-1] }

Row numbers are counted cardinally from 0:[0, 1, 2, ... , NUM_OF_ROWS - 1]

The values placed into the row of datatypes are 0, 1, 2, or 3 corresponding to the values of MAXL_DTINT_T inside maxldefs.h.

None = 0
Bool = 1
Number = 2
Char = 3