[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Still cannot extract enum values from column


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:- mark@xxxxxxxxxxxxx         http://www.wizdom.org.uk
Shadow:- webmaster@xxxxxxxxxxxxx  http://www.shadow.org.uk
Work:- netman@xxxxxxxxxxxxxxxxxxx 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 <mysql-thread68374@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



This mailing list archive is a service of Copilot Consulting.