"You have an error in your SQL syntax"

Home Forums Product Support Forums Ajax Search Pro for WordPress Support "You have an error in your SQL syntax"

This topic contains 2 replies, has 2 voices, and was last updated by outofhouse outofhouse 4 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22932
    outofhouse
    outofhouse
    Participant

    Hi – I seem to be getting a lot of database errors relating to the plugin here’s an error message from my log files (were are hundreds being generated and I’m getting some 502 errors):
    “WordPress database 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 ‘) )\r\n \r\n \r\n AND (1)\r\n ‘ at line 22 for query \r\n \t\tSELECT\r\n \t\t \r\n \t\t \r\n wp_terms.name as title,\r\n wp_terms.term_id as id,\r\n 1 as blogid,\r\n wp_term_taxonomy.description as content,\r\n ” as date,\r\n ” as author,\r\n wp_term_taxonomy.taxonomy as taxonomy,\r\n ‘term’ as content_type,\r\n ‘terms’ as g_content_type,\r\n (1) as relevance\r\n \t\tFROM\r\n \t\t wp_terms\r\n LEFT JOIN wp_term_taxonomy ON wp_terms.term_id = wp_term_taxonomy.term_id\r\n \r\n \r\n \r\n WHERE\r\n ( wp_term_taxonomy.taxonomy IN (‘pa_manufacturer’,’pa_product-subtitle’) )\r\n AND ( () )\r\n \r\n \r\n AND (1)\r\n \r\n \r\n \r\n GROUP BY \r\n wp_terms.term_id\r\n ORDER BY relevance DESC, date DESC, wp_terms.name ASC\r\n LIMIT 600 /* From [simpsons-online.co.uk/wp-admin/admin-ajax.php] in [/nas/content/live/simpsons/wp-content/plugins/ajax-search-pro/includes/classes/search/class-asp-search-terms.php:286] */ made by do_action(‘wp_ajax_ajaxsearchpro_search’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WD_ASP_Search_Handler->handle, ASP_Query->__construct, ASP_Query->get_posts, ASP_Search->search, ASP_Search_TERMS->do_search, referer: https://simpsons-online.co.uk/my-account/?password-reset=true

    Is this an issue that needs addressing in the plugin itself?

    Thanks
    Rob

    #22939
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you, I found the issue and corrected it via the files. I will make sure to include this additional check in the upcoming update.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #22940
    outofhouse
    outofhouse
    Participant

    Ok – thanks Ernest…

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

You must be logged in to reply to this topic.