code: public function constructInsertSQL($fields)
      {
          $sql = array();
  
          $sql[] = "INSERT INTO";
          $sql[] = "`" . $this->dbtable . "`";
          $sql[] = "(";
  
          $columns = array();
          foreach ($fields as $key => $value) {
              $columns[] = "`" . $key . "`";
          }
  
          $sql[] = implode(", ", $columns);
  
          $sql[] = ") VALUES (";
  
          $values = [];
          foreach ($fields as $key => $value) {
              $values[] = $value->getSQL();
          }
  
          $sql[] = implode(", ", $values);
          $sql[] = ")";
  
          return implode(" ", $sql);
      }
docs: Public: Construct SQL