当前位置:操作系统 > Unix/Linux >>

某个目录下产品根据创建时间自动下架

某个目录下产品根据创建时间自动下架
 
1
DELETE FROM catalog_category_product where 

category_id=7 and product_id in(select entity_id from 

catalog_product_entity where entity_id 

in(select t.product_id from 

(SELECT product_id,category_id from 

catalog_category_product) t where t.category_id=7) 

AND to_days(now())-to_days(created_at)>=90)

 


CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,