php-general | 2001092
Date: 09/25/01
- Next message: Scarbrough, Jeb (ISS Atlanta): "[PHP] writing files"
- Previous message: Sheridan Saint-Michel: "Re: [PHP] How to obtain all the fields' names of a MySQL table?"
- Maybe in reply to: Alex Shi: "[PHP] How to obtain all the fields' names of a MySQL table?"
- Next in thread: Alex Shi: "Re: [PHP] How to obtain all the fields' names of a MySQL table?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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:chpshi <email protected>]
Sent: Tuesday, September 25, 2001 12:03 PM
To: php-general <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: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Scarbrough, Jeb (ISS Atlanta): "[PHP] writing files"
- Previous message: Sheridan Saint-Michel: "Re: [PHP] How to obtain all the fields' names of a MySQL table?"
- Maybe in reply to: Alex Shi: "[PHP] How to obtain all the fields' names of a MySQL table?"
- Next in thread: Alex Shi: "Re: [PHP] How to obtain all the fields' names of a MySQL table?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

