Sql syntax errors

Home Forums Legacy Support Support queries Other issues Sql syntax errors

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #195615
    vasti123
    Participant
    ho there, im getting database connection errors. The host said it is sql syntax errors. Could you assist. There are 100’s of these.
    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 'AS activity\n WHERE activity.component = 'cours' at line 1 for query \n SELECT activity.content FROM AS activity\n WHERE activity.component = 'course'\n AND activity.type = 'retake_course'\n AND user_id = 4277\n AND item_id = 37655\n ORDER BY date_recorded DESC\n made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_template_redirect, do_action('bp_template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_screens, do...\n'
    [Wed Feb 06 05:43:04 2019] [error] [pid 42168] ssl_engine_kernel.c(204) [client ] - AH02032: Hostname www.teachtefl.durban provided via SNI and hostname teachtefl.co.za provided via HTTP are different
    teachtefl.co.za [Wed Feb 06 06:24:04 2019] [error] [pid 13826] mod_proxy_fcgi.c(673) [client 85.203.47.193:23471 ] - AH01071: Got error 'PHP message: 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 'AS activity\n\t\t\t\t\t\tWHERE \tactivity.component \t= 'course'\n\t\t\t\t\t\tAND \t( activity.ty' at line 1 for query \n\t\t\t\t\t\tSELECT activity.content FROM AS activity\n\t\t\t\t\t\tWHERE \tactivity.component \t= 'course'\n\t\t\t\t\t\tAND \t( activity.type \t= 'quiz_evaluated' OR activity.type \t= 'evaluate_quiz' )\n\t\t\t\t\t\tAND \tuser_id = 3345\n\t\t\t\t\t\tAND \t( item_id = 35836 OR secondary_item_id = 35836 )\n\t\t\t\t\t\tORDER BY date_recorded DESC\n\t\t\t\t\t made by do_action('wp_ajax_unit_traverse'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Course_Ajax->unit_traverse, the_unit, do_action('wplms_after_quiz_message'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Course_Action->show_quiz_results_after_quiz_message, bp_course_quiz_retake_form\n'
    teachtefl.co.za [Wed Feb 06 06:24:38 2019] [error] [pid 13826] mod_proxy_fcgi.c(673) [client 85.203.47.193:26439 ] - AH01071: Got error 'PHP message: 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 'AS activity\n\t\t\t\t\t\tWHERE \tactivity.component \t= 'course'\n\t\t\t\t\t\tAND \t( activity.ty' at line 1 for query \n\t\t\t\t\t\tSELECT activity.content FROM AS activity\n\t\t\t\t\t\tWHERE \tactivity.component \t= 'course'\n\t\t\t\t\t\tAND \t( activity.type \t= 'quiz_evaluated' OR activity.type \t= 'evaluate_quiz' )\n\t\t\t\t\t\tAND \tuser_id = 3345\n\t\t\t\t\t\tAND \t( item_id = 35836 OR secondary_item_id = 35836 )\n\t\t\t\t\t\tORDER BY date_recorded DESC\n\t\t\t\t\t made by do_action('wp_ajax_unit_traverse'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Course_Ajax->unit_traverse, the_unit, do_action('wplms_after_quiz_message'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP_Course_Action->show_quiz_results_after_quiz_message, bp_course_quiz_retake_form\n'
    teachtefl.co.za [Wed Feb 06 07:05:32 2019] [error] [pid 56579] mod_proxy_fcgi.c(673) [client 197.184.51.147:49235 ] - AH01071: Got error 'PHP message: 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 'as meta\n WHERE meta_key = 'remarks'\n ' at line 1 for query \n SELECT meta_value FROM as meta\n WHERE meta_key = 'remarks'\n AND meta.activity_id IN (SELECT activity.id FROM AS activity\n WHERE activity.component = 'course'\n AND activity.type = 'evaluate_assignment'\n AND item_id = 38137\n AND secondary_item_id = 3939\n ORDER BY date_recorded DESC)\n made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_...\n'
    teachtefl.co.za [Wed Feb 06 07:06:27 2019] [error] [pid 56579] mod_proxy_fcgi.c(673) [client 196.212.150.228:15169 ] - AH01071: Got error 'PHP message: 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 'AS activity\n\t\t\t\t\t\tWHERE \tactivity.component \t= 'course'\n\t\t\t\t\t\tAND \t( activity.ty' at line 1 for query \n\t\t\t\t\t\tSELECT activity.content FROM AS activity\n\t\t\t\t\t\tWHERE \tactivity.component \t= 'course'\n\t\t\t\t\t\tAND \t( activity.type \t= 'quiz_evaluated
    
    #195806
    Anshuman Sahu
    Keymaster
    Please goto wp-admin -> settings => buddypress -> components > please make sure that teh activity component is enabled or not . if not then enable it .
    #195935
    vasti123
    Participant
    Thank you, when I enable this, the students get an error 404 after they press continue course?
    #196077
    Anshuman Sahu
    Keymaster

    Please try to re-save permalinks to "postname" from wp-admin -> settings -> permalinks .

    If still issue persists then I guess you must have selected your register page in place of course status page there in wp-admin -> wplms -> course manager -> take this  course page .

    Please create a page named start course and select its page template to be " Start course page   " and then select this page back in wp-admin -> wplms -> course manager -> take this  course page .

    if still issue persists then please share your site url , admin credentials in private reply to check this issue at your end .

    #196894
    vasti123
    Participant
    This reply has been marked as private.
    #197094
    Anshuman Sahu
    Keymaster
    ok  can you please share your site url , admin credentials in private reply to check this issue at your end .
    #197109
    vasti123
    Participant
    This reply has been marked as private.
    #197222
    vasti123
    Participant
    This reply has been marked as private.
    #197346
    Mk
    Moderator
    The Error is related to retake quiz. And i checked your retake quiz is working fine. please check that. If its working fine, then you can ignore this warning.
    #198206
    vasti123
    Participant
    This reply has been marked as private.
    #198353
    Mk
    Moderator
    Its only possible when by any reason permalinks are changing. Possible reasons could be:
    • server
    • third party plugin
    • any other admin.
    Because we can check its not  due to theme or its plugins . Kindly check and reply.
Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Sql syntax errors’ is closed to new replies.