Problems? Is your data what you think it is? | |
PerlMonks |
Re: Escape characters in DBD CSVby afoken (Chancellor) |
on May 11, 2015 at 09:56 UTC ( [id://1126290]=note: print w/replies, xml ) | Need Help?? |
$dbh->do("UPDATE new_entrant SET forename='$wrk_forename',surname='$wrk_surname' FROM new_entrant WHERE emp_no='$wrk_emp_no'") or die $DBI::errstr; NEVER put Also note that there is no FROM in an UPDATE statement. And finally, enable autodie in DBI->connect(), that removes the need for or die $DBI::errstr for all DBI methods. Alexander Updated wording, thanks to soonix.
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|