I'm sure this exists, but after a few dozen searches, I'm not any closer to an answer.
After I've executed a query in Drupal (for example)
$dbParts = db_select("parts", "p") ->fields("p") ->execute();
How can I get a count (or list) of fields without pulling this first record? With MySQL I was able to use "mysql_num_fields".
Just to give a little background... I have some old code (using mysql_* functions) that export data to the DBF format. In order to format the header of the DBF, I need to have a field count (and information about the fields) even if the record count is 0 in order to format a "blank" database.