Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: dbi insert

by merlyn (Sage)
on Oct 15, 2001 at 18:33 UTC ( #118883=note: print w/replies, xml ) Need Help??


in reply to dbi insert

Replace:
my $sth = $dbh->prepare(INSERT into people (fornavn, efternavn, cpr, a +dresse, zip, city, tjenestested) values ($fornavn, $efternavn, $cpr, +$adresse, $zip, $city, $tjenestested)); $sth->execute(); $sth->finish();
with
my $sth = $dbh->do(q{ INSERT INTO people (fornavn, efternavn, cpr, adresse, zip, city, t +jenestested) VALUES (?, ?, ?, ?, ?, ?, ?, ?) }, undef, $fornavn, $efternavn, $cpr, $adresse, $zip, $city, $tjenestested);

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://118883]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2020-01-25 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?