Creates a DB command that can be used to execute this query.
public createCommand ( |
||
$db | the DB connection used to create the DB command. If `null`, the DB connection returned by [[modelClass]] will be used. | |
return | the created DB command instance. |
public function createCommand($db = null) { if ($db === null) { $db = Yii::$app->getDb(); } return parent::createCommand($db); }
public function createCommand($db = null) { if ($this->commonOnly) { $modelClass = $this->modelClass; $table = $modelClass::tableName(); $this->andWhere([$table . '.obschij' => true]); } return parent::createCommand($db); }