[Please respond directly to me as this address is not subscribed to this 
list - thnx]

When I parameter bind and execute() I get seemingly-subtle errors related 
to quoting.

my $sth = $dbh->prepare("SELECT * FROM ?");
my $table = "tblSites";
$sth->execute($table);

DBD::mysql::st execute failed: You have an error in your SQL syntax near 
''tblSites'' at line 1 at ./quoteTest line 31, <F> line 15.

This fails for the same reason why the following fails:

mysql> SELECT * FROM 'tblSites'; 
ERROR 1064: You have an error in your SQL syntax near ''tblSamples'' at 
line1

Back-ticks(`tblSites`) are fine, single quotes cause problems.

I can't seem to find any documentation on this issue.

-R

Reply via email to