public function sqlUpdate(
		$table,
		array $properties,
		$where,
		array $where_params = [],
		$limit = null
	) {
		$attributes = [];
		foreach ($properties as $attribute => $value) {
			$attributes[] = $attribute . ' = :U' . $attribute; // name parameters after attribute
			if (array_key_exists(':U' . $attribute, $where_params)) {
				throw new Exception('Named parameter already defined: ' . $attribute);
			}
			$where_params[':U' . $attribute] = $value;
		}
		$sql = $this->queryBuilder->buildUpdate($table, $attributes, $where, $limit);
		$query = $this->database->prepare($sql);
		$query->execute($where_params);
		$this->addQuery($query->queryString, $where_params);
		return $query->rowCount();
	}
public function sqlUpdate(
		$table,
		array $properties,
		$where,
		array $where_params = [],
		$limit = null
	) {
		$attributes = [];
		foreach ($properties as $attribute => $value) {
			$attributes[] = $attribute . ' = :U' . $attribute; // name parameters after attribute
			if (array_key_exists(':U' . $attribute, $where_params)) {
				throw new Exception('Named parameter already defined: ' . $attribute);
			}
			$where_params[':U' . $attribute] = $value;
		}
		$sql = $this->queryBuilder->buildUpdate($table, $attributes, $where, $limit);
		$query = $this->database->prepare($sql);
		$query->execute($where_params);
		$this->addQuery($query->queryString, $where_params);
		return $query->rowCount();
	}
public function sqlUpdate ( $ table , array $ properties , $ where , array $ where_params = [ ] , $ limit = null ) { $ attributes = [ ] ; foreach ( $ properties as $ attribute => $ value ) { $ attributes [ ] = $ attribute . ' = :U' . $ attribute ; // name parameters after attribute if ( array_key_exists ( ':U' . $ attribute , $ where_params ) ) { throw new Exception ( 'Named parameter already defined: ' . $ attribute ) ; } $ where_params [ ':U' . $ attribute ] = $ value ; } $ sql = $ this -> queryBuilder -> buildUpdate ( $ table , $ attributes , $ where , $ limit ) ; $ query = $ this -> database -> prepare ( $ sql ) ; $ query -> execute ( $ where_params ) ; $ this -> addQuery ( $ query -> queryString , $ where_params ) ; return $ query -> rowCount ( ) ; }
Requires named parameters.

@param string $table
@param string[] $properties
@param string $where
@param string[] $where_params
@param int $limit
@return int number of rows affected
@throws Exception if duplicate named parameter
Requires named parameters .