Hi,
While searching the net I came across some perl to get enum values from
a table column, but I can't get it to work due to my lack of
understanding of what is going on, I am not even sure I have read the
data correctly.
my $sth = $dbh->prepare("SELECT $column FROM $sqlTable");
$sth->execute;
/^enum\((.*)\)/ and do {
my $values = $1;
$values =~ s/^'//;
$values =~ s/'$//;
my @values = split /','/, $values;
# now print your dropdown with @values
foreach (@values) {
print $_ . "<br>";
}
};
--
He came from Econet - Oh no, I've run out of underpants :(
Home:- [EMAIL PROTECTED] http://www.wizdom.org.uk
Shadow:- [EMAIL PROTECTED] http://www.shadow.org.uk
Work:- [EMAIL PROTECTED] http://www.hinwick.demon.co.uk
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php