我有一个查询,我想用它来删除“已查看”列日期时间值超过 24 小时的数据行。我怎样才能用一个查询来做到这一点?可能吗?
这是我到目前为止所拥有的:
$delete_expired_notifications_query= "DELETE FROM notifications WHERE user_id=
'".$u_id."' AND viewed (some code that says older than 24hrs)";
mysqli_query($connect, $delete_expired_notifications_query);