Exemple #1
0
 /**
  * @see \yii\db\Connection::createCommand
  */
 public function createCommand($sql = null, $params = [])
 {
     $this->open();
     $command = new Command(['db' => $this, 'sql' => $sql]);
     return $command->bindValues($params);
 }
Exemple #2
0
 /**
  * Creates a command for execution.
  * @param string $sql the SQL statement to be executed
  * @param array $params the parameters to be bound to the SQL statement
  * @return Command the Sphinx command
  */
 public function createCommand($sql = null, array $params = [])
 {
     //$this->open();
     $command = new Command(['connection' => $this, 'sql' => $sql]);
     return $command->bindValues($params);
 }