RE: [PHP-DB] getting MySQL column header?
| From: | Aaron Wolski | Date: | Mon, 21 Jul 2003 20:32:24 +0000 |
| Subject: | RE: [PHP-DB] getting MySQL column header? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29369@lists.php.net to get a copy of this message | ||
>> Honestly, did you read the manual after I told you last time??
Umm.. am I missing something?
I don't believe I've ever asked this question before? If so... my bad.
I did have a gander at the manual and was unsure how I could grab the
header info and not add an additional query to get this info.
*shrugs*
Thanks for the info, though!
Aaron
-----Original Message-----
From: CPT John W. Holmes [mailto:holmes072000@charter.net]
Sent: July 21, 2003 4:24 PM
To: Aaron Wolski; php-db@lists.php.net
Subject: Re: [PHP-DB] getting MySQL column header?
> How would one get the column name/header out of this query so that I
> could display it as the header for my columns?
Honestly, did you read the manual after I told you last time??
$num_fields = mysql_num_fields($result)
for($x=0;$x<$num_fields;$x++)
{ echo mysql_field_name($result,$x); }
---John Holmes...