Yesideez Posted February 25, 2007 Share Posted February 25, 2007 Anyone know how I can do this? I need to build a drop-down box listing those available so the user can select what they need... My table is called "venues" and the ENUM I need to get the available values from is called "location" Quote Link to comment https://forums.phpfreaks.com/topic/40037-solved-getting-available-values-from-an-enum-type/ Share on other sites More sharing options...
btherl Posted February 26, 2007 Share Posted February 26, 2007 According to the docs: "If you want to determine all possible values for an ENUM column, use SHOW COLUMNS FROM tbl_name LIKE enum_col and parse the ENUM definition in the Type column of the output." http://dev.mysql.com/doc/refman/5.1/en/enum.html Quote Link to comment https://forums.phpfreaks.com/topic/40037-solved-getting-available-values-from-an-enum-type/#findComment-194110 Share on other sites More sharing options...
fenway Posted February 26, 2007 Share Posted February 26, 2007 Yeah, it's ugly, but that's the best you can do, at least for 4.1... does the information schema for 5 supply this info in a usable format? Probably, but I've never tried. Quote Link to comment https://forums.phpfreaks.com/topic/40037-solved-getting-available-values-from-an-enum-type/#findComment-194459 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.