表名:ims_hd_found_content
欄位:createtime(發布時間)
欄位:createdate(發布日期)
欄位:openid (發布用戶)
我要洗掉指定的用戶發布日期大于15天的所有內容
uj5u.com熱心網友回復:
select * from ims_hd_found_content where openid = 指定的用戶id and datediff(now(), createtime) > 15;uj5u.com熱心網友回復:
select * from ims_hd_found_content where openid = 指定的用戶id and datediff(now(), createdate) > 15;uj5u.com熱心網友回復:
delete from ims_hd_found_content where openid='' and now()-createdate>15;uj5u.com熱心網友回復:
你這個相減得到的不是天數。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/75184.html
標籤:MySQL
