diff --git a/classes/Model.class.php b/classes/Model.class.php index fcea759..8cbdbbc 100644 --- a/classes/Model.class.php +++ b/classes/Model.class.php @@ -2,11 +2,11 @@ /** * Класс модели данных * - * @copyright - * @link + * @copyright + * @link * @package Majestic * @subpackage DB - * @since + * @since * @version SVN: $Id$ * @filesource $URL$ */ @@ -126,9 +126,9 @@ class ModelSelectResult extends ModelResult $this->result = $res; } - function fetch() + function fetch($class_name = false) { - return mysqli_fetch_object($this->result); + return $class_name ? mysqli_fetch_object($this->result, $class_name) : mysqli_fetch_object($this->result); } function fetchField($field, $default = false)