you want to show the column names of WHAT?

if you want to get those of a previous SELECT..., there's a special function for that. 
here's some code from my mysql admin module:
 $fields = array();
 while ($meta = mysql_fetch_field($result))
 {
  array_push($fields, $meta->name);
 }

if you want to get the columns of a table in general, you may either use SHOW TABLE 
STATUS... or DESCRIBE...
you can test both in the mysql console and see what they return and how you need to 
interpret the result.

-yves
 
-----Ursprüngliche Nachricht----- 
Von: "Jake Johnson" <[EMAIL PROTECTED]>
An: "Mysql" <[EMAIL PROTECTED]>
Gesendet: Mittwoch, 23. Juli 2003 16:32
Betreff: How do I show column names in php? 


> 
> I am using php and mysql and I want to show the column names.  How do I go
> about doing this without hardcoding the headers in my php?
> 
> Regards,
> Jake Johnson
> [EMAIL PROTECTED]
> 
> ______________________________________________________________________
> Plutoid - http://www.plutoid.com - Shop Plutoid for the best prices on
> Rims, Car Audio, and Performance Parts.
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to