use DBI;
use strict;
# query in question
my $sth_sts = $dbh->prepare("UPDATE players SET t_id=?, bats=?, throws=?, status=? WHERE id=?");
my $i;
foreach $i (0 .. $#$prec) { # $prec is defined elsewhere
# blah
# blah
# blah
# blah
# execute in question
$sth_sts->execute($tid,$p->{P_BATS},$p->{P_THROWS},$p->{P_STATUS},$p->{P_PLAYERID})
or print "$DBI::errstr\n";
# blah
}
####
Unknown column 'R' in 'field list'
####
$tid = 20; # or any other 2 digit int
$p->{P_BATS} = 'R'; # or 'L','S'
$p->{P_THROWS} = 'R'; # or 'L'
$p->{P_STATUS} = 'A'; # or 'D','I','M'
$p->{P_PLAYERID} = 1846404; # or any other int up to 10 digits