Well, beauty is in the eye of the beer holder, but ... easier to read? How is
easier to read than$dbh2->do("INSERT INTO PerlTest (Postcode,street_column,streetCount) V +ALUES (?,?,?)", undef, '', $mystreet, 0);
? Not speaking about$dbh2->do("INSERT INTO PerlTest (Postcode,street_column,streetCount) V +ALUES ('',?,0)", undef, $mystreet);
versusmy $sth = $dbh2->prepare("INSERT INTO PerlTest (Postcode,street_column +,streetCount) VALUES (?,?,?)"); ... $sth->execute('', $mystreet, 0);
my $sth = $dbh2->prepare("INSERT INTO PerlTest (Postcode,street_column +,streetCount) VALUES ('',?,0)"); ... $sth->execute($mystreet);
Plus it makes the errors more likely, not less. IMnsHO.
Jenda
Enoch was right!
Enjoy the last years of Rome.
In reply to Re^5: SQL Insert with blank in the middle
by Jenda
in thread SQL Insert with blank in the middle
by dredwerker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |