Home : General : Perl Programming :

General: Perl Programming: Re: [Jorn] Using Perl to count MySQL tables: Edit Log

Here is the list of edits for this post
Re: [Jorn] Using Perl to count MySQL tables
I think what you want is just "show tables".

Code:
my $tables = [];

my $sth = $dbh->prepare("show tables");
$sth->execute();

while (my $table = $sth->fetchrow()) {
push @$tables, $table;
}

my $count = scalar @$tables;

Philip
------------------
Limecat is not pleased.

Last edited by:

fuzzy logic: Apr 11, 2005, 8:55 AM

Edit Log: