Hi,
I'want to write a script which update a DB in Internet.
from thr local DB I do a select query and while the select query run foreach row I do a UPDATE query:

$sth_orders_local->execute($lasttime, $starttime) or die "couldn't execute query orders remote: $DBI::errstr"; # fetch the local table


my $array_ref = $sth_orders_local->fetchall_arrayref( { orders_id => 1, vo_nr => 1, activation_date => 1, state => 1 } );

foreach my $row (@$array_ref) {

my $sql = <<EOT;
UPDATE IGNORE orders SET activation_date = $row->{activation_date}, state = $row->{state}
WHERE vo_nr = $row->{vo_nr} AND orders_id =$row->{orders_id}
EOT
$dbh->do($sql); #line 388
}

if I use a print instead of the sql update query everything work fine
print "\ttest1 $row->{orders_id}, test2 $row->{vo_nr}, test3 $row->{activation_date}, test4 $row->{state}\n";

but with the sql update statment I recieve the following erorr:
Use of uninitialized value in concatenation (.) or string at proe-balance.pl line 388.
DBD::mysql::db do failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE vo_nr = 012345 AND orders_id =100002012345' at line 2 at proe-balance.pl line 388.
DBD::mysql::db do failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE vo_nr = 012345 AND orders_id =100002012345' at line 2 at proe-balance.pl line 388.
Process perl exited with code 2

Please help I'm disperate

Thks

Xaver Biton