select * from letter where type='regform_footer' and sid='' failed: