-
Notifications
You must be signed in to change notification settings - Fork 0
/
deadline.php
27 lines (27 loc) · 961 Bytes
/
deadline.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
$sql="SELECT * FROM tobedelete";
$result=$conn->query($sql);
if ($result) {
while($row=$result->fetch_assoc()){
$username=$row['username'];
$dt=$row['dt'];
$title=$row['title'];
if ($dt>date("Y-m-d")) {
$tablename=$title.$username;
$sql="DROP $tablename";
$conn->query($sql);
$sql="DELETE FROM forminfo WHERE title='$title' AND username='$username'";
$conn->query($sql);
$sql="DELETE FROM images WHERE title='$title' AND username='$username'";
$conn->query($sql);
$sql="DELETE FROM files WHERE title='$title' AND username='$username'";
$conn->query($sql);
$sql="DELETE FROM question WHERE title='$title' AND uername='$username'";
$conn->query($sql);
$sql="DELETE FROM message WHERE title='$title' AND username='$username'";
$conn->query($sql);
$sql="DELETE FROM tobedelete WHERE title='$title' AND username='$username'";
$conn->query($sql);
}
}
}