Placeholders do only work for column values. The basic rule is that the database must be able to construct a query plan when it sees the prepared statement with only the placeholders. Statements with placeholders are unlikely to work where a table name or column name is expected.
So your best approach is to interpolate the table name and then do a ->selectall_arrayref. Also, you might want to take a look at the catalog methods in DBI, which tell you about tables and columns in a fashion independent of the database.
In reply to Re: Can not get the same output from $dbh->do and $dbh->prepare
by Corion
in thread Can not get the same output from $dbh->do and $dbh->prepare
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |