mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-02 12:57:35 +01:00
ReportQueries.php: add deleteByPost
This commit is contained in:
parent
fafe9a0257
commit
47432f9ae5
@ -205,6 +205,17 @@ class ReportQueries {
|
|||||||
$query->execute();
|
$query->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all reports from of the given post.
|
||||||
|
*
|
||||||
|
* @param int $post_id The post's id.
|
||||||
|
*/
|
||||||
|
public function deleteByPost(int $post_id) {
|
||||||
|
$query = $this->pdo->prepare('DELETE FROM `reports` WHERE `post` = :post');
|
||||||
|
$query->bindValue(':post', $post_id);
|
||||||
|
$query->execute();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a new report.
|
* Inserts a new report.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user