$value = $form->parse_amount($myconfig, $form->{"lastcost_$i"});
if ($value == $form->{"old_lastcost_$i"})
{
- $lastupdate = $dbh->quote($form->{"lastupdate_$i"});
+ if ($form->{"lastupdate_$i"} eq "") {
+ $lastupdate = 'now()';
+ } else {
+ $lastupdate = $dbh->quote($form->{"lastupdate_$i"});
+ }
} else {
$lastupdate = 'now()';
}