上个星期在写一个需求,大概就是消息的删除,然后我想通过改变is_del,is_read字段的0与1来删除:
UPDATE notify SET is_del=1,is_read=1
WHERE uid=0 and type=2 and ctime like '2020-08-18%'
但是大佬说时间那里不要这样搞,要这样:
UPDATE notify SET is_del=1,is_read=1
WHERE uid=0 and type=1 and (ctime>='2020-08-18 00:00:00' and ctime<='2020-08-18 23:59:59')