* Chris Rogers <[EMAIL PROTECTED]> [2002-11-26 09:45]:
> Is there a way to get a list of all table names in specific database
> using DBI::mysql in Perl?

Can you use SHOW TABLES?  E.g.:

  sub show_tables {
      my $dbh = shift;
      my ($sth, @tables, $table);

      $sth = $dbh->prepare("SHOW TABLES");
      $sth->execute;

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

      $sth->finish;

      return @tables;
  }

(darren)

-- 
I have learnt silence from the talkative, toleration from the
intolerant, and kindness from the unkind; yet strange, I am
ungrateful to these teachers.
    -- Kahlil Gibran

Reply via email to