Title: MySQL Syntax Error from NextGen
Last modified: August 21, 2016

---

# MySQL Syntax Error from NextGen

 *  [pembo13](https://wordpress.org/support/users/pembo13/)
 * (@pembo13)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/mysql-syntax-error-from-nextgen/)
 * Using the latest version of NextGen gallery. The following invalid SQL is generated
 * SELECT * FROM `wp_ngg_pictures` WHERE (`exclude` = 0) AND (`galleryid` IN (15))
   ORDER BY ABS(`sortorder`) ASC, `sortorder` ASC LIMIT -20, 20
 * and is triggered by M_NextGen_Basic_Gallery->render
 * [http://wordpress.org/plugins/nextgen-gallery/](http://wordpress.org/plugins/nextgen-gallery/)

The topic ‘MySQL Syntax Error from NextGen’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * 0 replies
 * 1 participant
 * Last reply from: [pembo13](https://wordpress.org/support/users/pembo13/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/mysql-syntax-error-from-nextgen/)
 * Status: not resolved