http://qs321.pair.com?node_id=305938


in reply to Re: Mysql syntax error
in thread Mysql syntax error from DBI

my $sth =$dbh ->prepare("UPDATE products set pname=? and unit=? and qty=? and cost=? WHERE id = ?");
should do the trick.

No. It shouldn't.

The SQL syntax is wrong (see meetraz's answer.