original_string: protected function buildMultiRowInsertStatement($rows,$table=null) {
  		if (!$table) {
  			$table = $this->primaryTable;
  		}
  		$bindparams = array();
  		$sqlRows = NULL;
  		$sqlFields = implode(',',array_keys(current($rows)));
  		$x = 1;
  		foreach ($rows as $data) {
  			$sqlValues = NULL;
  			foreach ($data as $field=>$value) {
  				$sqlValues .= ":{$field}{$x},";
  				$bindparams[":{$field}{$x}"] = $value;
  			}
  			$sqlValues = rtrim($sqlValues,',');
  			$sqlRows .= "({$sqlValues}),";
  			$x++;
  		}
  		$sql = "INSERT INTO {$table} ({$sqlFields}) VALUES ".rtrim($sqlRows,',');
  		return $this->executeUpdate($sql,$bindparams);
  	}
code: protected function buildMultiRowInsertStatement($rows,$table=null) {
  		if (!$table) {
  			$table = $this->primaryTable;
  		}
  		$bindparams = array();
  		$sqlRows = NULL;
  		$sqlFields = implode(',',array_keys(current($rows)));
  		$x = 1;
  		foreach ($rows as $data) {
  			$sqlValues = NULL;
  			foreach ($data as $field=>$value) {
  				$sqlValues .= ":{$field}{$x},";
  				$bindparams[":{$field}{$x}"] = $value;
  			}
  			$sqlValues = rtrim($sqlValues,',');
  			$sqlRows .= "({$sqlValues}),";
  			$x++;
  		}
  		$sql = "INSERT INTO {$table} ({$sqlFields}) VALUES ".rtrim($sqlRows,',');
  		return $this->executeUpdate($sql,$bindparams);
  	}
code_tokens: protected function buildMultiRowInsertStatement ( $ rows , $ table = null ) { if ( ! $ table ) { $ table = $ this -> primaryTable ; } $ bindparams = array ( ) ; $ sqlRows = NULL ; $ sqlFields = implode ( ',' , array_keys ( current ( $ rows ) ) ) ; $ x = 1 ; foreach ( $ rows as $ data ) { $ sqlValues = NULL ; foreach ( $ data as $ field => $ value ) { $ sqlValues .= ":{$field}{$x}," ; $ bindparams [ ":{$field}{$x}" ] = $ value ; } $ sqlValues = rtrim ( $ sqlValues , ',' ) ; $ sqlRows .= "({$sqlValues})," ; $ x ++ ; } $ sql = "INSERT INTO {$table} ({$sqlFields}) VALUES " . rtrim ( $ sqlRows , ',' ) ; return $ this -> executeUpdate ( $ sql , $ bindparams ) ; }
docstring: Builds and executes a single insert statement that inserts multiple new records
  @param mixed[][] $rows An array of associative arrays (ColumnName->Value) of data representing the new DB records
  @param string $table Optional - The table to insert the new records into. Defaults to $primaryTable
  @return boolean True on success, false on failure
docstring_tokens: Builds and executes a single insert statement that inserts multiple new records