in reply to called with 19 bind variables when 20 are needed, error
If you add scalar in front of each param, or do something like this instead, you'll be happier:
In fact, there's still far too much regularity in that code for my taste. You should abstract out the fields and mapping from form names to db columns.$sth->execute(map scalar param($_), qw(cat itemid price des longdes si +ze o1n o1o o2n o2o o3n o3o c1n c1v c2n c2v c3n c3v small large)) or d +ie $dbh->errstr;
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: called with 19 bind variables when 20 are needed, error
by andrew (Acolyte) on Jul 20, 2002 at 22:08 UTC | |
by merlyn (Sage) on Jul 20, 2002 at 22:14 UTC |