code: public function constructUpdateSQL($changed, $fields)
      {
          $sql = array();
  
          $sql[] = "UPDATE";
          $sql[] = "`" . $this->dbtable . "`";
          $sql[] = "SET";
  
          $values = array();
          foreach ($changed as $key => $value) {
              $values[] = "`" . $key . "`=" . $value->getSQL();
          }
          $sql[] = implode(", ", $values);
  
          $sql[] = "WHERE `" . $this->pk . "`='" . $this->constructorId . "'";
  
          return implode(" ", $sql);
      }
docs: Public: Construct update SQL