in reply to MySQL Database Check...
The 'SHOW TABLES' MySQL command will return a list of all the tables in your database. No error checking for brevity. Obviously you can just load this into a hash for a quick lookup.
require DBI; my $dbh = DBI->connect( ..blah.. ); my $sth = $dbh->prepare('SHOW TABLES'); $sth->execute(); while (my ($table) = $sth->fetchrow_array ) { print "$table\n"; }
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: MySQL Database Check...
by steves (Curate) on Jan 02, 2003 at 05:29 UTC | |
by tachyon (Chancellor) on Jan 02, 2003 at 05:41 UTC | |
by powerhouse (Friar) on Jan 02, 2003 at 06:36 UTC | |
by vek (Prior) on Jan 02, 2003 at 13:20 UTC |