基本上我想要任何用户在系统中注册自己。创建日期为1个月后,应自动从db中删除用户
在我的表格中,我有creationDate
列。我完成了我的系统创建调度程序。它的工作。我只是想知道将为我的事情设置什么样的查询
下面是我的cron.php代码:
<?php
include 'db.php';
$sql = mysqli_query($conn,'select * from user where createdDate<=CURRENT_DATE - INTERVAL 3 DAY');
$data = mysqli_num_rows($sql);
if($data > 0)
{
while ($row = mysqli_fetch_array($sql))
{
$id = $row['userId'];
$sql = mysqli_query($conn, "DELETE FROM user where userId='".$id."'");
}
}
?>
答案 0 :(得分:0)
按照以下方法使用 powershell
命中您的文件/功能
打开Windows任务计划