public function update($table, $params, $where) {
		$params = $this->filter_table_data($table, $params, $this);

		$keys = array_keys($params);
		foreach ($keys as $key => $value) {
			$keys[$key] = $this->quote_identifier($value);
		}

		$query = 'UPDATE ' . $this->quote_identifier($table) . ' SET ';

		$first = true;
		foreach ($params as $key => $value) {
			if (!$first) {
				$query .= ', ';
			}
			$query .= $this->quote_identifier($key) . '= ?';
			$first = false;
		}

		$query .= ' WHERE ' . $where;

		$statement = $this->get_statement($query, $params);
		$statement->execute();
	}
public function update($table, $params, $where) {
		$params = $this->filter_table_data($table, $params, $this);

		$keys = array_keys($params);
		foreach ($keys as $key => $value) {
			$keys[$key] = $this->quote_identifier($value);
		}

		$query = 'UPDATE ' . $this->quote_identifier($table) . ' SET ';

		$first = true;
		foreach ($params as $key => $value) {
			if (!$first) {
				$query .= ', ';
			}
			$query .= $this->quote_identifier($key) . '= ?';
			$first = false;
		}

		$query .= ' WHERE ' . $where;

		$statement = $this->get_statement($query, $params);
		$statement->execute();
	}
public function update ( $ table , $ params , $ where ) { $ params = $ this -> filter_table_data ( $ table , $ params , $ this ) ; $ keys = array_keys ( $ params ) ; foreach ( $ keys as $ key => $ value ) { $ keys [ $ key ] = $ this -> quote_identifier ( $ value ) ; } $ query = 'UPDATE ' . $ this -> quote_identifier ( $ table ) . ' SET ' ; $ first = true ; foreach ( $ params as $ key => $ value ) { if ( ! $ first ) { $ query .= ', ' ; } $ query .= $ this -> quote_identifier ( $ key ) . '= ?' ; $ first = false ; } $ query .= ' WHERE ' . $ where ; $ statement = $ this -> get_statement ( $ query , $ params ) ; $ statement -> execute ( ) ; }
Construct and execute an update query

@access public
@param string $table The table to update
@param array $params The values to update the table with
@param string $where A WHERE-clause to add to the query
Construct and execute an update query