예제 #1
0
 function __construct($table, $fields = "*", $from = "", $where = "", $limit_size = 30)
 {
     // Вызываем конструктор родительского класса
     parent::__construct($table);
     // Заполняем поля объекта
     $this->fields = $fields;
     if ('' == $from) {
         $from = $table;
     }
     $this->from = $from;
     $this->where = $where;
     $this->limit_size = $limit_size;
     // Конструируем sql-запрос (за исключением предложения LIMIT)
     // Если нужен более сложный запрос - его необходимо задать после вызова конструктора
     // явно заполнив поля объекта $sql
     $connector = $this->connector;
     global ${$connector};
     $this->sql = " SELECT " . $this->fields . " " . " FROM " . $this->from . " " . ${$connector}->sqlGetWhere($where);
     //dbg($this->sql);
 }
예제 #2
0
파일: Product.php 프로젝트: adobi/exam
 public function __construct()
 {
     parent::__construct();
 }
 public function __construct($database, $table_name = 'string_store', $comment = '', $string_size = 1024, $string_index_size = 0, $recreate = false)
 {
     $this->StringSize = $string_size;
     $this->StringIndexSize = $string_index_size;
     parent::__construct($table_name, $comment, $database, $recreate);
 }