mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 08:35:18 +00:00
Delete all the comments of a post
This commit is contained in:
@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user