SHOW COLUMNS and enum

wxdqz

New Member
I have a problem getting enum types from a database. I want to use them in a drop down menu for selection.

I have this code in my file:
$categories_result=mysql_query("SHOW COLUMNS FROM picture_categories LIKE 'category'", $db);

(from the mySQL docs: SHOW COLUMNS FROM table_name LIKE enum_column_name)

The 'picture_categories' table has a 'category' column with a number of already defined enum types.

The query goes through, but I was supposed to get a description of the enum types in return, but get a "7"...?

What am I doing wrong?

Martin
 
Back
Top