Why won't this work?
$sql = "select date from ? where user=?";
$sth = $dbh->prepare($sql) ||
die print "Couldn't prepare statement:\n$DBI::errstr\n";
$sth->execute( $treename, $owner) || die "could not execute sql:\n$sql";
I get this:
DBD::mysql::st execute failed: You have an error in your SQL syntax near
''export' where user='postman''
at line 1 at ./rsyring_netapp_quota_db.pl line 180, <QUOTAS> line 4. could not execute sql:
select date from ? where user=? at ./rsyring_netapp_quota_db.pl line 180, <QUOTAS> line 4.
I notice there are single quotes in the error I get before: 'export...
and after: ...postman'
I don't think they should be there. How do I get them out?