想要在mysql中获取订阅将在5天后过期的记录吗
希望在mysql中获取订阅将在5天后过期的记录 查询使用-想要在mysql中获取订阅将在5天后过期的记录吗,mysql,Mysql,希望在mysql中获取订阅将在5天后过期的记录 查询使用- select * from tbl_users user inner join tbl_purchase_plan plan on (user.cc_plan_option_id=plan.id) where DATE_SUB( user.created, INTERVAL plan.plan_duration MONTH ) = (CURDATE() + INTERVAL 3 DAY) and user.status=1 se
select *
from tbl_users user
inner join tbl_purchase_plan plan on (user.cc_plan_option_id=plan.id)
where DATE_SUB( user.created, INTERVAL plan.plan_duration MONTH ) = (CURDATE() + INTERVAL 3 DAY)
and user.status=1
select *
from tbl_users user
inner join tbl_purchase_plan plan on (user.cc_plan_option_id=plan.id)
where DATEDIFF(CURDATE(),DATE_ADD( user.created, INTERVAL plan.plan_duration MONTH )) = 5
and user.status=1