in reply to DBI query where table name is a variable
For example this won't work:
Whereas this might, depending on how your db delimits:my $table = "Robert dropped a table on his foot"; my sql = qq{SELECT * FROM $table WHERE x=?};
my $table = "Robert dropped a table on his foot"; my sql = qq{SELECT * FROM "$table" WHERE x=?};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI query where table name is a variable
by jZed (Prior) on Oct 23, 2007 at 16:02 UTC | |
|
Re^2: DBI query where table name is a variable
by spatterson (Pilgrim) on Oct 23, 2007 at 12:07 UTC | |
by Krambambuli (Curate) on Oct 23, 2007 at 12:49 UTC | |
by andreas1234567 (Vicar) on Oct 23, 2007 at 12:48 UTC |