Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: DBI SQL statement in while loop

by rbc (Curate)
on Dec 03, 2002 at 21:37 UTC ( #217356=note: print w/ replies, xml ) Need Help??


in reply to DBI SQL statement in while loop

Your code snippet looks a little odd to me.
Maybe its a typo but wouldn't you want this:

while (<>) { my $quantity = param("quantity"); $quantity = $dbh->quote( $quantity ); my $gross_sales = param("gross_sales"); $gross_sales = $dbh->quote( $gross_sales ); my $sql2 = qq/ INSERT INTO transaction_details (quantity, gross_sales) VALU +ES ($quantity, convert (money, $gross_sales)) /; my $rv = $dbh->do( $sql2 ); }


Comment on Re: DBI SQL statement in while loop
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2015-07-08 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (96 votes), past polls