Open shordeaux opened 8 years ago
update users set is_member = 0; update users set is_member = 1 where id in (select distinct(user_id) from past_times where ressource_id = 1 and date_past > DATE_SUB(now(), INTERVAL 6 MONTH));
update users set is_member = 0; update users set is_member = 1 where id in (select distinct(user_id) from past_times where ressource_id = 1 and date_past > DATE_SUB(now(), INTERVAL 6 MONTH));