looks like sql syntax error to me.
Did you ever test this?