mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-27 15:59:29 +00:00
Check if a commen exists
This commit is contained in:
parent
c19ab3d587
commit
2c4e84a7db
@ -51,6 +51,18 @@ class Comments {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a comment exists or not
|
||||||
|
*
|
||||||
|
* @param int $commentID The ID of the comment to check
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function exists(int $commentID) : bool {
|
||||||
|
|
||||||
|
return CS::get()->db->count($this::COMMENTS_TABLE, "WHERE ID = ?", array($commentID)) > 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse a comment informations
|
* Parse a comment informations
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user