delete td2 from marina term data td2 inner…


delete td2 from marina_term_data td2 inner join (select td.tid, count(tn.nid), td.name from marina_term_data td left join marina_term_node tn on td.tid=tn.tid where td.vid=7 group by td.tid having count(tn.nid)=0) td3 on td2.tid=td3.tid;

delete o1 from marina_uc_attribute_options o1 inner join (select o.oid,o.name from marina_uc_attribute_options o left join marina_term_data td on BINARY o.name=td.name where o.aid=2 and td.tid is null) o2 on o1.oid=o2.oid;

nomortogelku.xyz

Добавить комментарий