select * from type where grp='stureg_attach' and val=1 and code=1 and (sid='' or sid=0) order by idx asc failed: