Re: Updating columns in a row at a time
Posted in 1998
Dave wrote: [SNIP] > this info, updated. I must be missing something little. Here's what I've > gotten so far. (Note: I can get the $st1, $wc and $row to print back hashes > and arrays, so it has to be something with the $st2.) Here we go: [SNIP] > $st2 = $dbh->prepare ("update $table set (name_last, name_first, degree, > title, research, phone_office, phone_dept, phone_home, email_addr, homepage, > expertise_1, expertise_2, contact_print, contact_video, photo_release, > language_1, language_2, language_3, language_4, language_5, language_6, > general_1, specific1_1, specific1_2, specific1_3, specific1_4, specific1_5, > general_2, specific2_1, specific2_2, specific2_3, specific2_4, > specific2_5)=(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, > ?) where id = ? $wc") I don't know DBI/DBD but I do know PREPARE. Your problem seems to be last line I have copied. I do not understand the purpose of $wc at the end if this statement, I suspect it is causing a problem. Since it contains the cursor name of the previous statement ($st1) did you mean that last line to read: ?) where current of $wc") This should work, though it creates some concurrency issues and leaves you open to long transaction problems if someone pulls up the form and does not commit before going to lunch/home. Also are you binding variables for all of the replaceable parameters in the update? Art S. Kagel