RE: [PHP-DB] getting MySQL column header?
| From: | Ow Mun Heng | Date: | Tue, 22 Jul 2003 01:45:42 +0000 |
| Subject: | RE: [PHP-DB] getting MySQL column header? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29377@lists.php.net to get a copy of this message | ||
Hey John,
This is another person asking the same question as I did.. & thanks
again for your help.. :)
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168
-----Original Message-----
From: CPT John W. Holmes [mailto:holmes072000@charter.net]
Sent: Tuesday, July 22, 2003 4:24 AM
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...