public function test() { /* * $query=new Query(); $query->addSelect(['g.*']) ->from ([Order::tableName().' o']) ->leftJoin(Position::tableName().' p','o.id = p.id_order') ->leftJoin(Good::tableName(). ' g','p.id_good = g.id') ->where(['o.id'=>':id'],[':id'=>$id]); return $query->all(); * */ $query = new Query(); $query->from('list'); return $query->all(); }
/** * Executes query and returns all results as an array. * @param Connection $db the DB connection used to create the DB command. * If null, the DB connection returned by [[modelClass]] will be used. * @return array|ActiveRecord[] the query results. If the query results in nothing, an empty array will be returned. */ public function all($db = null) { return parent::all($db); }