[PHP] Re: Get MySQL table field names

2004-02-29 Thread Michael Kunze
Matt Palermo wrote:

 How can I get the field names from a specified MySQL table?  I don't need
 the data, I just want to get an array of the tables field names.

use 'DESC table_name;'

-- 
Michael Kunze
http://www.smrealms.de/

Caterva carissima mea est Ille Quis.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Get MySQL table field names

2004-02-29 Thread Five

Michael Kunze [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 Matt Palermo wrote:

  How can I get the field names from a specified MySQL table?  I don't need
  the data, I just want to get an array of the tables field names.

 use 'DESC table_name;'

 -- 
 Michael Kunze
 http://www.smrealms.de/

 Caterva carissima mea est Ille Quis.

Could you elaborate on that a litttle? I spent about an hour researching and 
experimenting with DESC and can't get it to work.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Get MySQL table field names

2004-02-29 Thread Jason Wong
On Monday 01 March 2004 10:04, Five wrote:
 Michael Kunze [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]

  Matt Palermo wrote:
   How can I get the field names from a specified MySQL table?  I don't
   need the data, I just want to get an array of the tables field names.
 
  use 'DESC table_name;'

 Could you elaborate on that a litttle? I spent about an hour researching
 and experimenting with DESC and can't get it to work.

mysql_list_fields(), read it before you use it.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
A man is only a man, but a good bicycle is a ride
-- Murphy's Laws on Sex n50
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Get MySQL table field names

2004-02-29 Thread Five

Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 On Monday 01 March 2004 10:04, Five wrote:
  Michael Kunze [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
 
   Matt Palermo wrote:
How can I get the field names from a specified MySQL table?  I don't
need the data, I just want to get an array of the tables field names.
  
   use 'DESC table_name;'
 
  Could you elaborate on that a litttle? I spent about an hour researching
  and experimenting with DESC and can't get it to work.

 mysql_list_fields(), read it before you use it.

 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 A man is only a man, but a good bicycle is a ride
 -- Murphy's Laws on Sex n50
 */

Thanks, that's much easier

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php