mirror of
				https://github.com/pierre42100/ComunicAPI
				synced 2025-10-31 10:14:51 +00:00 
			
		
		
		
	Check if a commen exists
This commit is contained in:
		| @@ -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 | ||||||
| 	 *  | 	 *  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Pierre
					Pierre