a punctuation mark, also know as front quote or left quote or open quote
` <---
a punctuation mark, also know as front quote or left quote or open quote
And don't hard-code the timestamp, change the last line tostevemaury wrote: ↑Mon Feb 22, 2021 6:50 pmYou don't need the back ticks, and I would addgpraceman wrote: ↑Sun Feb 23, 2020 7:48 amHere's the down and dirty query that I came up with. Anyone that hasn't been active in the board for more than 3 years had their notifications removed.Code: Select all
UPDATE `phpbb3_user_notifications` SET `notify`=0 WHERE `method`="notification.method.email" AND `user_id` IN( SELECT `user_id` FROM `phpbb3_users` WHERE `user_lastvisit` > 0 AND`user_lastvisit` < 1487884864 )
In my case that was a whopping 6,045 records affected.AND user_type <> 2
to exclude Anonymous and bots.
Code: Select all
SELECT `user_id` FROM `phpbb3_users` WHERE `user_lastvisit` > 0 AND`user_lastvisit` < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 3 YEAR))
$table_prefix
is phpbb3.