/** * @param \Ilch\Database\Mysql $db * @param string|null $into table without prefix * @param array|null $values values as [name => value] */ public function __construct(DB $db, $into = null, $values = null) { parent::__construct($db); if (isset($values)) { $this->values($values); } if (isset($into)) { $this->into($into); } }
/** * @param \Ilch\Database\Mysql $db * @param string|null $from table without prefix * @param array|null $where conditions @see QueryBuilder::where() */ public function __construct(DB $db, $from = null, $where = null) { parent::__construct($db); if (isset($from)) { $this->from($from); } if (isset($where)) { $this->where($where); } }
/** * @param \Ilch\Database\Mysql $db * @param string|null $table table without prefix * @param array|null $values values as [name => value] * @param array|null $where conditions @see QueryBuilder::where() */ public function __construct(DB $db, $table = null, $values = null, $where = null) { parent::__construct($db); if (isset($values)) { $this->values($values); } if (isset($table)) { $this->table($table); } if (isset($where)) { $this->where($where); } }
/** * Create Select Statement Query Builder * * @param \Ilch\Database\Mysql $db * @param array|string|null $fields * @param string|null $table table without prefix * @param array|null $where conditions @see QueryBuilder::where() * @param array|null $orderBy * @param array|int|null $limit */ public function __construct(DB $db, $fields = null, $table = null, $where = null, array $orderBy = null, $limit = null) { parent::__construct($db); if (isset($fields)) { $this->fields($fields); } if (isset($table)) { $this->from($table); } if (isset($where)) { $this->where($where); } if (isset($orderBy)) { $this->order($orderBy); } if (isset($limit)) { $this->limit($limit); } }