leostereo has asked for the wisdom of the Perl Monks concerning the following question:
Hi guys , im trying to declare an 'insert into' statement for a prepare function using a place holder for the table name but ... can not get it to work, the idea is as follows:
$sth = $dbh->prepare("INSERT INTO ? (ip,bsid,firmware) VALUES (?, ?, ? +)"); $sth->execute($table_name,$ip,$bsid,$firmware);
but im getting:
DBD::mysql::st execute failed: called with 4 bind variables when 3 are + needed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl dbi, prepare function using place holder
by Marshall (Canon) on Aug 25, 2016 at 16:17 UTC | |
by chacham (Prior) on Aug 25, 2016 at 17:01 UTC | |
by Marshall (Canon) on Aug 25, 2016 at 17:23 UTC | |
by chacham (Prior) on Aug 26, 2016 at 20:16 UTC | |
by leostereo (Beadle) on Sep 02, 2016 at 14:25 UTC |