title: MySQL server version for the right syntax to use near
body: <p>I am getting the following error:</p>
  
  <pre><code>"Error: You have an error in your SQL syntax; check the manual that corresponds
  to your MySQL server version for the right syntax to use near ' `DeweyEdition`
  BLOB NOT NULL, , `DeweyNumber` BLOB NOT NULL)' at line 1
  &lt;br /&gt;Error No: 1064&lt;br /&gt;ALTER TABLE tt_hj_import ADD COLUMN
  (`CountryOfPub` BLOB NOT NULL, , `DeweyEdition` BLOB NOT NULL, ,
  `DeweyNumber` BLOB NOT NULL) in /var/www/system/database/mysql.php on line 50" 
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>public function alterImportTable($new_fields) {
      if (!empty($new_fields)) {
          $sql = "ALTER TABLE " . DB_PREFIX . "hj_import ADD COLUMN ";
          $fields_sql = array();
          foreach ($new_fields as $field) {
              $fields_sql[] = '`' . $field . "` BLOB NOT NULL, ";
          }
          $sql .= '(' . implode(', ', $fields_sql) . ')';
          $sql = str_replace(', )', ')', $sql);
          $this-&gt;db-&gt;query($sql);
      }
  }
  </code></pre>
  
  <p>How do I fix this?</p>