in reply to Re^4: SQL Insert with blank in the middle
in thread SQL Insert with blank in the middle
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: SQL Insert with blank in the middle
by CountZero (Bishop) on Jul 08, 2010 at 20:28 UTC | |
by Jenda (Abbot) on Jul 08, 2010 at 22:09 UTC | |
by CountZero (Bishop) on Jul 09, 2010 at 06:28 UTC |