or download this
my $sql = 'INSERT INTO prodotti (nome_prod , tipologia_prod) VALUES (?
+, ?)' ;
my $sth = $dbh->prepare ($sql);
my $res = $sth->execute ($key_nome_prod, $key_tipo_prod);
die ("Result is $res instead of 1: " . $sth->errstr) unless (defined $
+res && $res == 1);