• Resolved Anonymous User 16127600

    (@anonymized-16127600)


    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

    (@rabilal)

    Hi,

    Thanks for it.
    We note it and will be updated in next version.

    Regards,
    Ahmad Bilal

    Thread Starter Anonymous User 16127600

    (@anonymized-16127600)

    Thank you! πŸ™‚

    -Liv

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

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