Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
the error saysmy @a=keys(%prophash); my $a=join(',',@a); my @b=values(%prophash); my $b=join(',',@b); my $temp="insert into maintable ($a) values($b)"; $sth = $dbh->prepare ($temp); $sth->execute();
can any one help me with this?DBD::ODBC::db prepare failed: [Microsoft][ODBC Microsoft Access Driver +] Syntax error in INSERT INTO statement. (SQL-42000)(DBD: st_prepare/ +SQLPrepare err=-1) at alldb.pl line 132, <DATA> line 283.
janitored by ybiC: Balanced <code> tags around snippet
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: large number of placeholders
by jhourcle (Prior) on Mar 26, 2005 at 12:33 UTC | |
|
Re: large number of placeholders
by BrentDax (Hermit) on Mar 26, 2005 at 12:07 UTC | |
|
Re: large number of placeholders
by cog (Parson) on Mar 26, 2005 at 13:43 UTC |