public function bindValues(\PDOStatement $stmt, array $params, DatabaseMap $dbMap)
    {
        $position = 0;
        foreach ($params as $param) {
            $position++;
            $parameter = ':p' . $position;
            $value = $param['value'];
            if (null === $value) {
                $stmt->bindValue($parameter, null, \PDO::PARAM_NULL);
                continue;
            }
            $tableName = $param['table'];
            if (null === $tableName) {
                $type = isset($param['type']) ? $param['type'] : \PDO::PARAM_STR;
                $stmt->bindValue($parameter, $value, $type);
                continue;
            }
            $cMap = $dbMap->getTable($tableName)->getColumn($param['column']);
            $this->bindValue($stmt, $parameter, $value, $cMap, $position);
        }
    }
public function bindValues(\PDOStatement $stmt, array $params, DatabaseMap $dbMap)
    {
        $position = 0;
        foreach ($params as $param) {
            $position++;
            $parameter = ':p' . $position;
            $value = $param['value'];
            if (null === $value) {
                $stmt->bindValue($parameter, null, \PDO::PARAM_NULL);
                continue;
            }
            $tableName = $param['table'];
            if (null === $tableName) {
                $type = isset($param['type']) ? $param['type'] : \PDO::PARAM_STR;
                $stmt->bindValue($parameter, $value, $type);
                continue;
            }
            $cMap = $dbMap->getTable($tableName)->getColumn($param['column']);
            $this->bindValue($stmt, $parameter, $value, $cMap, $position);
        }
    }
public function bindValues ( \ PDOStatement $ stmt , array $ params , DatabaseMap $ dbMap ) { $ position = 0 ; foreach ( $ params as $ param ) { $ position ++ ; $ parameter = ':p' . $ position ; $ value = $ param [ 'value' ] ; if ( null === $ value ) { $ stmt -> bindValue ( $ parameter , null , \ PDO :: PARAM_NULL ) ; continue ; } $ tableName = $ param [ 'table' ] ; if ( null === $ tableName ) { $ type = isset ( $ param [ 'type' ] ) ? $ param [ 'type' ] : \ PDO :: PARAM_STR ; $ stmt -> bindValue ( $ parameter , $ value , $ type ) ; continue ; } $ cMap = $ dbMap -> getTable ( $ tableName ) -> getColumn ( $ param [ 'column' ] ) ; $ this -> bindValue ( $ stmt , $ parameter , $ value , $ cMap , $ position ) ; } }
Binds values in a prepared statement.

This method is designed to work with the Criteria::createSelectSql() method, which creates
both the SELECT SQL statement and populates a passed-in array of parameter
values that should be substituted.

<code>
$adapter = Propel::getServiceContainer()->getAdapter($criteria->getDbName());
$sql = $criteria->createSelectSql($params);
$stmt = $con->prepare($sql);
$params = array();
$adapter->populateStmtValues($stmt, $params, Propel::getServiceContainer()->getDatabaseMap($critera->getDbName()));
$stmt->execute();
</code>

@param \PDOStatement $stmt
@param array         $params array('column' => ..., 'table' => ..., 'value' => ...)
@param DatabaseMap   $dbMap
Binds values in a prepared statement .