diff --git a/task3.php b/task3.php index cb86b2e..2ad9c12 100644 --- a/task3.php +++ b/task3.php @@ -1,2 +1,60 @@ -create(); + $this->fill(); + } + + /** + * Creates the 'Test' table with specific fields. + * + * This method is accessible only within the class. + */ + private function create() + { + // Implement code to create the 'Test' table with the specified fields. + } + + /** + * Fills the 'Test' table with random data. + * + * This method is accessible only within the class. + */ + private function fill() + { + // Implement code to fill the 'Test' table with random data (you can use ChatGPT for this purpose). + } + + /** + * Selects data from the 'Test' table based on the 'result' criteria. + * + * This method is accessible from outside the class. + * + * @return array An array of data rows that match the 'result' criterion. + */ + public function get() + { + // Implement code to select and return data from the 'Test' table based on the 'result' criteria ('normal' and 'success'). + } +} + +// Example usage: +$tableCreator = new TableCreator(); +$data = $tableCreator->get(); +// $data will contain the selected data rows from the 'Test' table with 'result' values 'normal' and 'success'. +?>