DBD::mysql::st execute failed: You have an error in your SQL syntax near 'cleaner and unit=cn and qty=15 and cost=1.35 WHERE id = 19' at line 1
Here is the code
my $sth =$dbh ->prepare ("UPDATE products set pname=$pname and unit=$ +unit and qty=$qty and cost=$cost WHERE id = $pid");
pname should be "drain cleaner", unit should be "cn", qty should be 15, and cost should be 1.35. Thanks. Chris. Never mind, I figured it out.
In reply to Mysql syntax error from DBI by chriso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |