How about this...

$db = "name_of_database";
$query = "DESCRIBE table_name";
$query = mysql_db_query($db,$query);
while ($row = mysql_fetch_row($query))
{
        echo "$row[0]<br>\n";
}


-----Original Message-----
From: Alex Shi [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 25, 2001 12:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to obtain all the fields' names of a MySQL table?


Hi,

I wanto know how can obtain all of the fields' names of a 
MySQL table in a php script. Anyone have an idea about
this please help. Thanks!

Alex


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To contact
the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to