SELECT corpno as id,corpname as name, picfile as pic,picalign as url,city as org_code FROM fxxfinfo WHERE (picfile <> '' and 1=1 ) UNION SELECT corpno as id,corpname as name, logofile as pic,picalign as url,city as org_code FROM fxxfinfo WHERE (logofile <> '' and 1=1 ) UNION SELECT corpno as id,corpname as name, pic3 as pic,picalign as url,city as org_code FROM fxxfinfo WHERE (pic3 <> '' and 1=1 ) UNION select id, title as name ,pic1 as pic , url,org_code from info where (second_id=10005 or second_id=9007 or second_id=8012 ) and pic1<>'' and state>0 and 1=1 order by id desc