Are you still having this issue?
What error is tossed?
I'm assuming the from variables were stripped by you, and that they are ALL right?
Can you have a variable, update_error_reasons, thats the same name as a function?
Is this perl btw?
You use plural and singular in spots. Verify those are all correct.
I'd probably add some screen output statements to verify that the input variables are good.
Its been a while for me and mysql/perl, but do you need to execute the statement or does it do that inside the mysql_query function?