On Mon, Mar 22, 1999 at 01:44:53PM -0700, Chris Cochella wrote:
> I am trying to select the list of values and indexes for an ENUM
> datatype. I am then using this key-value list to populate a pull down.
I did something like this once, and it seemed to work. Run a query
DESC table_name, then check the type that's returned:
/^enum\((.*)\)/ and do {
my $values = $1;
$values =~ s/^'//;
$values =~ s/'$//;
my @values = split /','/, $values;
# now print your dropdown with @values
};
That's perl, so if you're using another language you'll need to
translate.
Tim