peppiv has asked for the wisdom of the Perl Monks concerning the following question:
I get no errors. I just know that I'm not passing any data to this table (I pass other data to another table earlier in the program so I'm sure the DB connection works). Can I accept variables passed through a form to this script in a while statement?my $sql2 = qq/ INSERT INTO transaction_details (quantity, gross_sales) VALUES ($ +quantity, convert (money, $gross_sales)) /; while (<>) { my $quantity = param("quantity"); $quantity = $dbh->quote( $quantity ); my $gross_sales = param("gross_sales"); $gross_sales = $dbh->quote( $gross_sales ); my $rv = $dbh->do( $sql2 ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI SQL statement in while loop
by chromatic (Archbishop) on Dec 03, 2002 at 21:44 UTC | |
by mpeppler (Vicar) on Dec 03, 2002 at 23:48 UTC | |
|
Re: DBI SQL statement in while loop
by mpeppler (Vicar) on Dec 03, 2002 at 21:27 UTC | |
by peppiv (Curate) on Dec 03, 2002 at 21:32 UTC | |
by mpeppler (Vicar) on Dec 03, 2002 at 23:41 UTC | |
|
Re: DBI SQL statement in while loop
by UnderMine (Friar) on Dec 03, 2002 at 21:42 UTC | |
|
Re: DBI SQL statement in while loop
by rbc (Curate) on Dec 03, 2002 at 21:37 UTC |