$_ctagValue = $dbh->selectrow_array(qq{select `value` from `$_tableName` where `lngId` = ?}, undef, $in{lngId}); $_updatedTime = time(); $_updated = $dbh->do(qq{update `$_tableName` set `value` = ?, `d` = ? where `lngId` = ?}, undef, qq~$in{tagvalue}~, $_updatedTime, $in{lngId}); if($_updated) { # Insert Tracking... my($stmt,@place); $stmt .= ',' if $stmt; $stmt .= '`Id` = ?'; push(@place,$_cust_id); $stmt .= ',' if $stmt; $stmt .= '`lang` = ?'; push(@place,$_tableName); $stmt .= ',' if $stmt; $stmt .= '`lngId` = ?'; push(@place,$in{lngId}); $stmt .= ',' if $stmt; $stmt .= '`was` = ?'; push(@place,"$_ctagValue"); $stmt .= ',' if $stmt; $stmt .= '`now` = ?'; push(@place,"$in{tagvalue}"); $stmt .= ',' if $stmt; $stmt .= '`timel` = ?'; push(@place,(time() - $in{timel})); $stmt .= ',' if $stmt; $stmt .= '`d` = ?'; push(@place,"$_updatedTime"); $stmt = "INSERT INTO `translation_history` SET $stmt"; $_tracked = $dbh->do($stmt,undef,@place); if(!$_tracked) { &send_Richard_error(qq~Could not track language modification... attempted this: dbh->do($stmt,undef,~ . @place . qq~); any errors: ~ . $DBI::errstr); } $sess_ref->attr("show_message","success|I have successfully saved the changes to this language tag."); if($in{r} eq "q") { window_redirect("$_surl?pg=$in{pg}&do=$in{do}&view=doSearchTags&q=$in{q}$inc_sess_id"); } elsif($in{p}) { window_redirect("$_surl?pg=$in{pg}&do=$in{do}&view=$in{p}$inc_sess_id"); } else { window_redirect("$_surl?pg=$in{pg}&do=$in{do}$inc_sess_id"); } } else { &send_Richard_error(qq~Could not update a language tag, here is what I attempted: (dbh->do(qq{update `$_tableName` set `value` = ?, `d` = ? where `lngId` = ?}, undef, qq\~$in{tagvalue}\~, "$_updatedTime", "$in{lngId}")) any errors: ~ . $DBI::errstr); $sess_ref->attr("show_message","error|I could not save the changes you asked me to. I have brought you back to try again. " . $DBI::errstr); window_redirect("$_surl?pg=$in{pg}&do=$in{do}&view=editTag&lngId=$in{lngId}$inc_sess_id"); }