samples/PhotoAlbum/lib/rb.php
protected function bindParams($s,$aValues) {
		foreach($aValues as $key=>&$value) {
			if (is_integer($key)) {

				if (is_null($value)){
					$s->bindValue($key+1,null,PDO::PARAM_NULL);
				}
				elseif (!$this->flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter::canBeTreatedAsInt($value) && $value < 2147483648) {
					$s->bindParam($key+1,$value,PDO::PARAM_INT);
				}
				else {
					$s->bindParam($key+1,$value,PDO::PARAM_STR);
				}
			}
			else {
				if (is_null($value)){
					$s->bindValue($key,null,PDO::PARAM_NULL);
				}
				elseif (!$this->flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter::canBeTreatedAsInt($value) &&  $value < 2147483648) {
					$s->bindParam($key,$value,PDO::PARAM_INT);
				}
				else {
					$s->bindParam($key,$value,PDO::PARAM_STR);
				}
			}

		}
	}
protected function bindParams($s,$aValues) {
		foreach($aValues as $key=>&$value) {
			if (is_integer($key)) {

				if (is_null($value)){
					$s->bindValue($key+1,null,PDO::PARAM_NULL);
				}
				elseif (!$this->flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter::canBeTreatedAsInt($value) && $value < 2147483648) {
					$s->bindParam($key+1,$value,PDO::PARAM_INT);
				}
				else {
					$s->bindParam($key+1,$value,PDO::PARAM_STR);
				}
			}
			else {
				if (is_null($value)){
					$s->bindValue($key,null,PDO::PARAM_NULL);
				}
				elseif (!$this->flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter::canBeTreatedAsInt($value) &&  $value < 2147483648) {
					$s->bindParam($key,$value,PDO::PARAM_INT);
				}
				else {
					$s->bindParam($key,$value,PDO::PARAM_STR);
				}
			}

		}
	}
protected function bindParams ( $ s , $ aValues ) { foreach ( $ aValues as $ key => & $ value ) { if ( is_integer ( $ key ) ) { if ( is_null ( $ value ) ) { $ s -> bindValue ( $ key + 1 , null , PDO :: PARAM_NULL ) ; } elseif ( ! $ this -> flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter :: canBeTreatedAsInt ( $ value ) && $ value < 2147483648 ) { $ s -> bindParam ( $ key + 1 , $ value , PDO :: PARAM_INT ) ; } else { $ s -> bindParam ( $ key + 1 , $ value , PDO :: PARAM_STR ) ; } } else { if ( is_null ( $ value ) ) { $ s -> bindValue ( $ key , null , PDO :: PARAM_NULL ) ; } elseif ( ! $ this -> flagUseStringOnlyBinding && RedBean_QueryWriter_AQueryWriter :: canBeTreatedAsInt ( $ value ) && $ value < 2147483648 ) { $ s -> bindParam ( $ key , $ value , PDO :: PARAM_INT ) ; } else { $ s -> bindParam ( $ key , $ value , PDO :: PARAM_STR ) ; } } } }
Binds parameters. This method binds parameters to a PDOStatement for
Query Execution. This method binds parameters as NULL, INTEGER or STRING
and supports both named keys and question mark keys.

@param  PDOStatement $s       PDO Statement instance
@param  array        $aValues values that need to get bound to the statement

@return void
Binds parameters . This method binds parameters to a PDOStatement for Query Execution . This method binds parameters as NULL INTEGER or STRING and supports both named keys and question mark keys .