Title: Database error
Last modified: May 3, 2018

---

# Database error

 *  Resolved Anonymous User 16127600
 * (@anonymized-16127600)
 * [8 years ago](https://wordpress.org/support/topic/database-error-263/)
 * Hi! 🙂
 * while testing the JS Support Ticket plugin, we encountered a database error:
 *     ```
       WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows,cols,required,field,fieldtitle,isuserfield,userfieldtype,userfieldparams,de' at line 1]
       SELECT rows,cols,required,field,fieldtitle,isuserfield,userfieldtype,userfieldparams,depandant_field FROM wp_js_ticket_fieldsordering WHERE isuserfield = 1 AND published = 1 AND search_visitor =1 AND fieldfor =1 ORDER BY ordering
       ```
   
 * This error would occur above any JS support ticket page, but would not SEEM to
   affect how the plugin works.
 * i did some digging and noticed that there is a slight error in the above SQL 
   query:
    The list of rows, that come after the SELECT statement, have to be enclosed
   in single-quotes, so it needs to look like this: `'rows','cols','required','field','
   fieldtitle','isuserfield','userfieldtype','userfieldparams','depandant_field'`
   instead of `rows,cols,required,field,fieldtitle,isuserfield,userfieldtype,userfieldparams,
   depandant_field`.
 * i was able to find the file which had this SQL query in it, and i added the single
   
   quotes to the list of rows which cleared the error. The modified file is `../
   plugins/js-support-ticket/includes/classes/customfields.php`. (Of course if the
   plugin gets updated, these changes are overwritten) i also noticed that this 
   SQL query does not seem to return anything.
 * We are using PHP version 7.2.4, MariaDB 10.2.14 and WordPress 4.9.5.
 * Can you provide some more insight on this and perhaps an official solution?
 * Thanks in advance! 🙂
 *  – Liv

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

 *  Plugin Author [JoomSky](https://wordpress.org/support/users/rabilal/)
 * (@rabilal)
 * [8 years ago](https://wordpress.org/support/topic/database-error-263/#post-10249704)
 * Hi,
 * Thanks for it.
    We note it and will be updated in next version.
 * Regards,
    Ahmad Bilal
 *  Thread Starter Anonymous User 16127600
 * (@anonymized-16127600)
 * [8 years ago](https://wordpress.org/support/topic/database-error-263/#post-10253881)
 * Thank you! 🙂
 *  -Liv

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

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

 * ![](https://ps.w.org/js-support-ticket/assets/icon-128x128.png?rev=3337825)
 * [JS Help Desk – AI-Powered Support & Ticketing System](https://wordpress.org/plugins/js-support-ticket/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/js-support-ticket/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/js-support-ticket/)
 * [Active Topics](https://wordpress.org/support/plugin/js-support-ticket/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/js-support-ticket/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/js-support-ticket/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: Anonymous User 16127600
 * Last activity: [8 years ago](https://wordpress.org/support/topic/database-error-263/#post-10253881)
 * Status: resolved