McMahon has asked for the wisdom of the Perl Monks concerning the following question:
"table" has two columns to hold timestamp and varchar. $var is getting set correctly. And when I run this code, I getmy $sql1 = qq{ INSERT INTO table VALUES ( current_timestamp, ? ) }; $dbh->do ($sql1,undef,$var);
I have tried using two ?s and replacing undef with current_timestamp, but that didn't help. I've also tried "do ($sql1,,$var)", which yields the messageexecute called with 1 bind variables, 0 needed at /usr/lib/perl5/vendo +r_perl/5.8.3/i586-linux-thread-multi/DBI.pm line 1383.
Any suggestions to get this INSERT to work would be appreciated.DBI::st=HASH(0x8357038)->_prepare(...): attribute parameter '<contents + of $var>' is not a hash ref at /usr/lib/perl5/vendor_perl/5.8.3/i586 +-linux-thread-multi/DBD/Pg.pm line 146.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD::Pg placeholder problem
by runrig (Abbot) on Aug 30, 2004 at 23:35 UTC | |
|
Re: DBD::Pg placeholder problem
by JAMBOID (Sexton) on Aug 30, 2004 at 23:03 UTC | |
|
Re: DBD::Pg placeholder problem
by grinder (Bishop) on Aug 31, 2004 at 07:48 UTC | |
by runrig (Abbot) on Aug 31, 2004 at 16:37 UTC | |
by McMahon (Chaplain) on Aug 31, 2004 at 14:20 UTC |