function update(array $where, array $data, $returning = "*") {
		$query = $this->getQueryWriter()->reset();
		$query->write("UPDATE", $this->conn->quoteName($this->name));
		$first = true;
		foreach ($data as $key => $val) {
			$query->write($first ? "SET" : ",", $key, "=", 
				$query->param($val, $this->getAttributes()->getColumn($key)->type));
			$first and $first = false;
		}
		$query->write("WHERE")->criteria($where);
		if (strlen($returning)) {
			$query->write("RETURNING", $returning);
		}
		return $this->execute($query);
	}
function update(array $where, array $data, $returning = "*") {
		$query = $this->getQueryWriter()->reset();
		$query->write("UPDATE", $this->conn->quoteName($this->name));
		$first = true;
		foreach ($data as $key => $val) {
			$query->write($first ? "SET" : ",", $key, "=", 
				$query->param($val, $this->getAttributes()->getColumn($key)->type));
			$first and $first = false;
		}
		$query->write("WHERE")->criteria($where);
		if (strlen($returning)) {
			$query->write("RETURNING", $returning);
		}
		return $this->execute($query);
	}
function update ( array $ where , array $ data , $ returning = "*" ) { $ query = $ this -> getQueryWriter ( ) -> reset ( ) ; $ query -> write ( "UPDATE" , $ this -> conn -> quoteName ( $ this -> name ) ) ; $ first = true ; foreach ( $ data as $ key => $ val ) { $ query -> write ( $ first ? "SET" : "," , $ key , "=" , $ query -> param ( $ val , $ this -> getAttributes ( ) -> getColumn ( $ key ) -> type ) ) ; $ first and $ first = false ; } $ query -> write ( "WHERE" ) -> criteria ( $ where ) ; if ( strlen ( $ returning ) ) { $ query -> write ( "RETURNING" , $ returning ) ; } return $ this -> execute ( $ query ) ; }
Update rows in the table
@param array $where
@param array $data
@param string $returning
@retunr mixed
Update rows in the table