Get all the enum values from a Mysql column?
| From: | John Guynn | Date: | Tue, 21 Nov 2000 16:32:43 +0000 |
| Subject: | Get all the enum values from a Mysql column? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-4612@lists.php.net to get a copy of this message | ||
Is there an easy way to get all the enum values from a column?
For example I have an enum column with the values
"Astro","Camaro","Firehawk","Neon" and I would like to pull
those values out
to put in as <option>s in a html form with <select>.
I've read the mysql maunal about pulling all the values from and enum
column, "If you want to get all possible values for an ENUM column, you
should use: SHOW COLUMNS FROM table_name LIKE enum_column_name and parse the
ENUM definition in the second column." For some reason I can't make heads
or tails of this.
Anyone?
John Guynn