framework/db/schema/CDbCommandBuilder.php
public function bindValues($command, $values)
	{
		if(($n=count($values))===0)
			return;
		if(isset($values[0])) // question mark placeholders
		{
			for($i=0;$i<$n;++$i)
				$command->bindValue($i+1,$values[$i]);
		}
		else // named placeholders
		{
			foreach($values as $name=>$value)
			{
				if($name[0]!==':')
					$name=':'.$name;
				$command->bindValue($name,$value);
			}
		}
	}
public function bindValues($command, $values)
	{
		if(($n=count($values))===0)
			return;
		if(isset($values[0])) // question mark placeholders
		{
			for($i=0;$i<$n;++$i)
				$command->bindValue($i+1,$values[$i]);
		}
		else // named placeholders
		{
			foreach($values as $name=>$value)
			{
				if($name[0]!==':')
					$name=':'.$name;
				$command->bindValue($name,$value);
			}
		}
	}
public function bindValues ( $ command , $ values ) { if ( ( $ n = count ( $ values ) ) === 0 ) return ; if ( isset ( $ values [ 0 ] ) ) // question mark placeholders { for ( $ i = 0 ; $ i < $ n ; ++ $ i ) $ command -> bindValue ( $ i + 1 , $ values [ $ i ] ) ; } else // named placeholders { foreach ( $ values as $ name => $ value ) { if ( $ name [ 0 ] !== ':' ) $ name = ':' . $ name ; $ command -> bindValue ( $ name , $ value ) ; } } }
Binds parameter values for an SQL command.
@param CDbCommand $command database command
@param array $values values for binding (integer-indexed array for question mark placeholders, string-indexed array for named placeholders)
Binds parameter values for an SQL command .