in reply to MySQL UPDATE in PERL
The statement handle execute method returns status. It returns a value that evaluates as false to indicate failure. When this happens, you can get the error message by looking at the statement handle's errstr property. An alternative would be to set the RaiseError or PrintError option when you establish your database connection.
If you had done one of these, DBI probably would have told you that the number of values supplied did not match the number of fields specified in the update statement. Unless my eyes are failing me, there are 10 fields listed but only 9 question marks in the value list.
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';
|
|---|