Почему этот запрос не вставляется и не завершается ошибкой, и кажется, что он вообще не обрабатывается в PDO? - PullRequest
0 голосов
/ 07 ноября 2018

Я использую одноэлементный подход Simple PDO-оболочки, указанный на https://phpdelusions.net/pdo/pdo_wrapper

У меня есть следующий запрос

                $new_app_insert_query = DB::run('INSERT INTO applicant_education_record (
                                        id_applicant_account,
                                        institution,
                                        diploma_certificate_type,
                                        dates_of_attendance,
                                        major,
                                        date_of_degree,
                                        gpa,
                                        city_of_institution,
                                        state_or_country_of_institution,
                                        institution_b,
                                        diploma_certificate_type_b,
                                        dates_of_attendance_b,
                                        major_b,
                                        date_of_degree_b,
                                        gpa_b,
                                        city_of_institution_b,
                                        state_or_country_of_institution_b,
                                        institution_c,
                                        diploma_certificate_type_c,
                                        dates_of_attendance_c,
                                        major_c,
                                        date_of_degree_c,
                                        gpa_c,
                                        city_of_institution_c,
                                        state_or_country_of_institution_c,
                                        institution_d,
                                        diploma_certificate_type_d,
                                        dates_of_attendance_d,
                                        major_d,
                                        date_of_degree_d,
                                        gpa_d,
                                        city_of_institution_d,
                                        state_or_country_of_institution_d,
                                        institution_e,
                                        diploma_certificate_type_e,
                                        dates_of_attendance_e,
                                        major_e,
                                        date_of_degree_e,
                                        gpa_e,
                                        city_of_institution_e,
                                        state_or_country_of_institution_e,
                                        institution_f,
                                        diploma_certificate_type_f,
                                        dates_of_attendance_f,
                                        major_f,
                                        date_of_degree_f,
                                        gpa_f,
                                        city_of_institution_f,
                                        state_or_country_of_institution_f,
                                        institution_g,
                                        diploma_certificate_type_g,
                                        dates_of_attendance_g,
                                        major_g,
                                        date_of_degree_g,
                                        gpa_g,
                                        city_of_institution_g,
                                        state_or_country_of_institution_g,
                                        institution_h,
                                        diploma_certificate_type_h,
                                        dates_of_attendance_h,
                                        major_h,
                                        date_of_degree_h,
                                        gpa_h,
                                        city_of_institution_h,
                                        state_or_country_of_institution_h,
                                        transcript_a,
                                        transcript_b,
                                        transcript_c,
                                        transcript_d,
                                        transcript_e,
                                        transcript_f,
                                        transcript_g,
                                        transcript_h) 
                                        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',$binds);
                                        header("Location: ../new_app_acct_4.php");

Мой массив привязок выглядит так:

$binds = [
                $_POST['id_applicant_account'],
                $_POST['institution'],
                $_POST['diploma_certificate_type'],
                $dates_of_attendance,
                $_POST['major'],
                $_POST['date_of_degree'],
                $_POST['gpa'],
                $_POST['city_of_institution'],
                $_POST['state_or_country_of_institution'],

                $_POST['institution_b'],
                $_POST['diploma_certificate_type_b'],
                $dates_of_attendance_b,
                $_POST['major_b'],
                $_POST['date_of_degree_b'],
                $_POST['gpa_b'],
                $_POST['city_of_institution_b'],
                $_POST['state_or_country_of_institution_b'],

                $_POST['institution_c'],
                $_POST['diploma_certificate_type_c'],
                $dates_of_attendance_c,
                $_POST['major_c'],
                $_POST['date_of_degree_c'],
                $_POST['gpa_c'],
                $_POST['city_of_institution_c'],
                $_POST['state_or_country_of_institution_c'],

                $_POST['institution_d'],
                $_POST['diploma_certificate_type_d'],
                $dates_of_attendance_d,
                $_POST['major_d'],
                $_POST['date_of_degree_d'],
                $_POST['gpa_d'],
                $_POST['city_of_institution_d'],
                $_POST['state_or_country_of_institution_d'],

                $_POST['institution_e'],
                $_POST['diploma_certificate_type_e'],
                $dates_of_attendance_e,
                $_POST['major_e'],
                $_POST['date_of_degree_e'],
                $_POST['gpa_e'],
                $_POST['city_of_institution_e'],
                $_POST['state_or_country_of_institution_e'],

                $_POST['institution_f'],
                $_POST['diploma_certificate_type_f'],
                $dates_of_attendance_f,
                $_POST['major_f'],
                $_POST['date_of_degree_f'],
                $_POST['gpa_f'],
                $_POST['city_of_institution_f'],
                $_POST['state_or_country_of_institution_f'],

                $_POST['institution_g'],
                $_POST['diploma_certificate_type_g'],
                $dates_of_attendance_g,
                $_POST['major_g'],
                $_POST['date_of_degree_g'],
                $_POST['gpa_g'],
                $_POST['city_of_institution_g'],
                $_POST['state_or_country_of_institution_g'],

                $_POST['institution_h'],
                $_POST['diploma_certificate_type_h'],
                $dates_of_attendance_h,
                $_POST['major_h'],
                $_POST['date_of_degree_h'],
                $_POST['gpa_h'],
                $_POST['city_of_institution_h'],
                $_POST['state_or_country_of_institution_h'],
                'no','no','no','no','no','no','no','no'
            ];

Когда я запускаю свое приложение, я не получаю никаких ошибок MySQL или php. Форма успешно отправляется, затем перенаправляется на new_app_acct_4.php. База данных не обновляется новыми вставленными записями, и ни PHP, ни MySQL не выдают никаких ошибок. Любые предложения по устранению неполадок приветствуются.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...