Raziel has asked for the wisdom of the Perl Monks concerning the following question:
I am using the DBI module and I have the name of my table contained in a file (a kind of .ini file). When I prepare my select statement, I get an error saying there is someting wrong with the FROM statement. Here is my code:
$sth = $db->prepare('SELECT Names FROM $table WHERE Name = ?'); $rv = $sth->execute($name);
The name of the table is correct in the variable $table, but I get an error. How can I get around this? I am using an Access database. Thanks for any help
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Variable table
by Pardus (Pilgrim) on Jan 23, 2003 at 19:00 UTC | |
|
Re: Variable table
by hardburn (Abbot) on Jan 23, 2003 at 19:52 UTC | |
|
Re: Variable table
by Raziel (Initiate) on Jan 23, 2003 at 20:07 UTC | |
by Sifmole (Chaplain) on Jan 23, 2003 at 20:34 UTC | |
by poj (Abbot) on Jan 23, 2003 at 21:29 UTC |