Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
when i run it with warnings it gives no errors but does not update the database i have printed out the database statements as print statements and it seems to be getting all the correct values in the loop so the hashes it is using seem to be set up right but when i check the database nothing has changed any ideas?? i tried it with and without the "my" statements on the dbh commands.my $teamposition; my $thisteam; my $thisscore; for $_ ( 1..13){ $thisteam = $teams{"team$_"}; $thisscore = $scores{"score$_"}; $teamposition = $_; my $sth1 = $dbh->do("UPDATE trees SET department = \'$thisteam\' WHERE + sport = \'$sport\' AND round = \'$teamposition\'")|| die "Can't exec +ute SQl update 1"; my $sth2 = $dbh->do("UPDATE trees SET score = \'$thisscore\' WHERE spo +rt = \'$sport\' AND round = \'$teamposition\'")|| die "Can't execute +SQl update 2"; my $sth3 = $dbh->do("UPDATE results SET score =\'$thisscore\' WHERE ye +ar = \'$thisyear\' AND sport =\'$sport\' AND department = \'$thisteam +\'")|| die "Can't execute SQl update 3"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: more and more dbi issues
by thabenksta (Pilgrim) on Apr 04, 2001 at 23:29 UTC | |
|
Re: more and more dbi issues
by sutch (Curate) on Apr 04, 2001 at 23:09 UTC | |
by Anonymous Monk on Apr 05, 2001 at 02:03 UTC | |
by arturo (Vicar) on Apr 05, 2001 at 02:09 UTC | |
by Anonymous Monk on Apr 05, 2001 at 02:48 UTC | |
by arturo (Vicar) on Apr 05, 2001 at 03:09 UTC |