Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Having issues with DBI

by bradcathey (Prior)
on Dec 11, 2008 at 02:44 UTC ( [id://729586]=note: print w/replies, xml ) Need Help??


in reply to Having issues with DBI

You don't need:

my $rowCheckQuery = qq{SELECT color_id FROM color WHERE color=?};

in the loop. Simplify with

my $stmt = qq{SELECT color_id FROM color WHERE color=?};\ my $color_id; foreach my $color (@color){ $color =~ s/^\s+|\s+$//gm; $color_id = $dbh->selectrow_array($stmt, undef, $color); }

Required reading.

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-03-29 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found