Is there a better way to do this, perhaps with using INFORMATION SCHEMA now available in MySQL 5, which I am using? Thanks monks.foreach my $tablename (@tables) { my $sth = $dbh->prepare(qq{select * from $tablename limit 1}); + $sth->execute(); my @fields = @{$sth->{NAME}}; for (0 .. $#fields) { $default_column{$fields[$_]} = $sth->{mysql_is_num}[ $_] ? 0 : '""'; } $table_columns{$tablename} = \@fields; }
In reply to Selecting from multiple tables by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |