Re: Get Column Names for mySQL...

From: Date: Sun, 06 Jun 2004 21:07:42 +0000
Subject: Re: Get Column Names for mySQL...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187752@lists.php.net to get a copy of this message
Russell P Jones wrote:
How would one cycle through and get all of the column names in a mysql table? say that i have... id | title | name | description 1 | MR. | russ | age XX height XX 2 | MRS. | jan | age XX height XXX and I want to print out the 4 column names... how would one accomplish this?
Either parse the results of a "DESC tablename" query or use the mysql_list_fields() function. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#187752) next »