Title: SQL error
Last modified: August 24, 2016

---

# SQL error

 *  Resolved [gbell12](https://wordpress.org/support/users/gbell12/)
 * (@gbell12)
 * [11 years ago](https://wordpress.org/support/topic/sql-error-26/)
 * v2.3.0 of the plugin showed a SQL error upon activation:
 *     ```
       CREATE TABLE k0198tny_ewwwio_images ( id mediumint(9) NOT NULL AUTO_INCREMENT, path text NOT NULL, image_md5 VARCHAR(55), results VARCHAR(55) NOT NULL, gallery VARCHAR(30), image_size int UNSIGNED, orig_size int UNSIGNED, UNIQUE KEY id (id), INDEX path_image_size (path(255), image_size), );
       ERROR 1064 (42000): 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 ')' at line 1
       ```
   
 * The trailing comma seems to be the problem. Deleting it makes the query go through.
 * That above is actually from MySQL command-line interface because I was unable
   to reproduce the problem even after deactivating the plugin and dropping that
   table… weird because I couldn’t get it to try and re-create the table even after
   a complete uninstall and reinstall.
 * Up to you if you want to pursue. Happy to help debug.
 * [https://wordpress.org/plugins/ewww-image-optimizer/](https://wordpress.org/plugins/ewww-image-optimizer/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years ago](https://wordpress.org/support/topic/sql-error-26/#post-5990615)
 * Yeah, it will only attempt the creation once, based upon the EWWW version stored
   in the wp_options table. If you delete the EWWW version, then it will re-attempt
   it. I’ve also seen some weirdness with it claiming a duplicate key name, perhaps
   the comma is causing both issues. I’ll see what I can find on that.
 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years ago](https://wordpress.org/support/topic/sql-error-26/#post-5990623)
 * Looks like that fixed the other issue too, thanks for reporting it!
 *  [anthonygore](https://wordpress.org/support/users/anthonygore/)
 * (@anthonygore)
 * [11 years ago](https://wordpress.org/support/topic/sql-error-26/#post-5990628)
 * I found the same bug, can confirm deleting the trailing comma worked.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘SQL error’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

## Tags

 * [create table](https://wordpress.org/support/topic-tag/create-table/)

 * 3 replies
 * 3 participants
 * Last reply from: [anthonygore](https://wordpress.org/support/users/anthonygore/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/sql-error-26/#post-5990628)
 * Status: resolved