How can I get enum possible values in a MySQL database using php? [duplicate]
You should parse information from information_schema
.columns
table -
SELECT column_typeFROM information_schema.columnsWHERE table_schema = 'your_schema' AND table_name = 'your_table' AND column_name = 'your_column'
...another query -
SELECT TRIM(TRAILING ')' FROM TRIM(LEADING '(' FROM TRIM(LEADING 'enum' FROM column_type))) column_typeFROM information_schema.columnsWHERE table_schema = 'your_schema' AND table_name = 'your_table' AND column_name = 'your_column';
There will be something like this - enum('01','02','03')
. Parse this string in the php-application.