public function createCommand($db = null)
    {
        $this->setConnection($db);
        $db = $this->getConnection();
        list ($sql, $params) = $db->getQueryBuilder()->build($this);

        return $db->createCommand($sql, $params);
    }
public function createCommand($db = null)
    {
        $this->setConnection($db);
        $db = $this->getConnection();
        list ($sql, $params) = $db->getQueryBuilder()->build($this);

        return $db->createCommand($sql, $params);
    }
public function createCommand ( $ db = null ) { $ this -> setConnection ( $ db ) ; $ db = $ this -> getConnection ( ) ; list ( $ sql , $ params ) = $ db -> getQueryBuilder ( ) -> build ( $ this ) ; return $ db -> createCommand ( $ sql , $ params ) ; }
Creates a Sphinx command that can be used to execute this query.
@param Connection $db the Sphinx connection used to generate the SQL statement.
If this parameter is not given, the `sphinx` application component will be used.
@return Command the created Sphinx command instance.
Creates a Sphinx command that can be used to execute this query .