src/xPDO/Om/xPDOQuery.php
public function command($command= 'SELECT') {
        $command= strtoupper(trim($command));
        if (preg_match('/(SELECT|UPDATE|DELETE)/', $command)) {
            $this->query['command']= $command;
            if (in_array($command, array('DELETE','UPDATE'))) $this->_alias= $this->xpdo->getTableName($this->_class);
        }
        return $this;
    }
public function command($command= 'SELECT') {
        $command= strtoupper(trim($command));
        if (preg_match('/(SELECT|UPDATE|DELETE)/', $command)) {
            $this->query['command']= $command;
            if (in_array($command, array('DELETE','UPDATE'))) $this->_alias= $this->xpdo->getTableName($this->_class);
        }
        return $this;
    }
public function command ( $ command = 'SELECT' ) { $ command = strtoupper ( trim ( $ command ) ) ; if ( preg_match ( '/(SELECT|UPDATE|DELETE)/' , $ command ) ) { $ this -> query [ 'command' ] = $ command ; if ( in_array ( $ command , array ( 'DELETE' , 'UPDATE' ) ) ) $ this -> _alias = $ this -> xpdo -> getTableName ( $ this -> _class ) ; } return $ this ; }
Set the type of SQL command you want to build.

The default is SELECT, though it also supports DELETE and UPDATE.

@param string $command The type of SQL statement represented by this object.  Default is 'SELECT'.
@return xPDOQuery Returns the current object for convenience.
Set the type of SQL command you want to build .