mirror of
				https://github.com/pierre42100/ComunicAPI
				synced 2025-11-04 12:14:12 +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
 | 
						 * Parse a comment informations
 | 
				
			||||||
	 * 
 | 
						 * 
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user