	static public function deleteCategory($_id = 0)
	{
		if ($_id != 0) {
			
			$result_stmt = Database::prepare("
				SELECT COUNT(`id`) as `numtickets` FROM `" . TABLE_PANEL_TICKETS . "`
				WHERE `category` = :cat");
			$result = Database::pexecute_first($result_stmt, array(
				'cat' => $_id
			));
			
			if ($result['numtickets'] == "0") {
				$del_stmt = Database::prepare("
					DELETE FROM `" . TABLE_PANEL_TICKET_CATS . "` WHERE `id` = :id");
				Database::pexecute($del_stmt, array(
					'id' => $_id
				));
				return true;
			} else {
				return false;
			}
		}
		
		return false;
	}
The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.