retrieving ENUM description from MySQL
| From: | Alan Lord | Date: | Wed, 19 Nov 2003 17:12:01 +0000 |
| Subject: | retrieving ENUM description from MySQL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-170320@lists.php.net to get a copy of this message | ||
Hi all,
This is a bit wierd so don't flame please.
Imagine a database table, field defined as ENUM with a list of allowed types
such as
"Mr", "Mrs", "Miss", "Dr", "Prof", etc - you get
the idea.
I've read the MySQL manual and by using
SHOW COLUMNS FROM "table_name" LIKE "enum_column_name";
I can get a result.
But the string of ENUMs is not an array. It is returned as a string with all
types in one string.
Anyone got any ideas about how to retrieve it in a better way - else I'll
need to start exploding the string...
Thanks in advance
Al