src/xPDO/Om/xPDOCriteria.php
public function prepare($bindings= array (), $byValue= true, $cacheFlag= null) {
        if ($this->stmt === null || !is_object($this->stmt)) {
            if (!empty ($this->sql) && $stmt= $this->xpdo->prepare($this->sql)) {
                $this->stmt= & $stmt;
                $this->bind($bindings, $byValue, $cacheFlag);
            }
        }
        return $this->stmt;
    }
public function prepare($bindings= array (), $byValue= true, $cacheFlag= null) {
        if ($this->stmt === null || !is_object($this->stmt)) {
            if (!empty ($this->sql) && $stmt= $this->xpdo->prepare($this->sql)) {
                $this->stmt= & $stmt;
                $this->bind($bindings, $byValue, $cacheFlag);
            }
        }
        return $this->stmt;
    }
public function prepare ( $ bindings = array ( ) , $ byValue = true , $ cacheFlag = null ) { if ( $ this -> stmt === null || ! is_object ( $ this -> stmt ) ) { if ( ! empty ( $ this -> sql ) && $ stmt = $ this -> xpdo -> prepare ( $ this -> sql ) ) { $ this -> stmt = & $ stmt ; $ this -> bind ( $ bindings , $ byValue , $ cacheFlag ) ; } } return $ this -> stmt ; }
Prepares the sql and bindings of this instance into a PDOStatement.

The {@link xPDOCriteria::$sql} attribute must be set in order to prepare
the statement. You can also pass bindings directly to this function and
they will be run through {@link xPDOCriteria::bind()} if the statement
is successfully prepared.

If the {@link xPDOCriteria::$stmt} already exists, it is simply returned.

@param array $bindings Bindings to merge with any existing bindings
defined for this xPDOCriteria instance.  Bindings can be simple
associative array of key-value pairs or the value for each key can
contain elements titled value, type, and length corresponding to the
appropriate parameters in the PDOStatement::bindValue() and
PDOStatement::bindParam() functions.
@param boolean $byValue Determines if the $bindings are to be bound as
parameters (by variable reference, the default behavior) or by direct
value (if true).
@param boolean|integer $cacheFlag The cacheFlag indicates the cache state
of the xPDOCriteria object and can be absolutely off (false), absolutely
on (true), or an integer indicating the number of seconds the result will
live in the cache.
@return \PDOStatement The prepared statement, ready to execute.
Prepares the sql and bindings of this instance into a PDOStatement .