mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
Delete all the comments of a post
This commit is contained in:
parent
336fa60314
commit
d6f2e9bac7
@ -38,6 +38,19 @@ class Comments {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete all the comments associated to a post
|
||||||
|
*
|
||||||
|
* @param int $postID The ID of the target post
|
||||||
|
* @return bool TRUE in case of success / FALSE else
|
||||||
|
*/
|
||||||
|
public function delete_all(int $postID) : bool {
|
||||||
|
|
||||||
|
//Perform the request on the database
|
||||||
|
return CS::get()->db->deleteEntry($this::COMMENTS_TABLE, "ID_texte = ?", array($postID));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse a comment informations
|
* Parse a comment informations
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user