Is there a way to get a list of all table names in specific database using
DBI:mysql in Perl? I can get the list of databases using:
@databases = DBI->data_sources("mysql");
and the list of fields in any given table but I can't figure out how to get
the list of tables. The documentation references the method "table" which
is used as:
$arrayref = $statementhandle->{mysql_table};
This is supposed to return a reference to an array of tables. What it does
return is an array reference of the table names that were part of the FROM
clause in the statement. However, each table name is returned a number of
times that is equal to the number of fields in that table. The most
important thing to note here is that I may not know that names of the tables
in the database, so constructing a statement that includes table names, then
using a function to extract those table names from the statement seems like
backtracking.
I just need to know how to get a list of table names for a given database.
I would really appreciate any information or just hints in the right
direction.
Thanks,
Chris