my $query = "UPDATE items SET price=? WHERE itemref=?;"; print $query; $sth = $dbh->prepare ( $query ); $sth->execute ($price,$itemref);