我试图在PDO中保存记录,它没有显示任何错误和查询执行成功,但我的记录不保存

时间:2016-01-01 10:56:17

标签: php pdo

我正在尝试保存记录,但是当我运行此代码时它执行没有任何错误,但在数据库中它没有显示我的记录插入..... 这是我保存记录的代码: -

$qre = $conn->prepare("INSERT INTO student_master (`StudentId`, `AddmissionNo`, `AddmissionDate`, `AddmissionYear`, `AddmissionClass`, `StudentCode`, `RegistrationNo`, `EnquiryNo`, `StudentName`, `FatherName`, `MotherName`, `Address`, `City`, `State`, `ClassId`, `SectionId`, `GroupId`, `ClassRollNo`, `Gender`, `BloodGroup`, `DOB`, `DateOfJoining`, `GameId`, `PersonIdMark`, `Caste`, `Religion`, `ConcessionId`, `BoardAddmissionNoIXAndX`, `BoardAddmissionNoXIAndXII`, `BoardRollNoIXAndX`, `BoardRollNoXIAndXII`, `Nationality`, `FatherProfessionId`, `FatherDeptId`, `FatherDesgId`, `FatherBussiness`, `FatherWorkSpace`, `FatherAnnualIncome`, `MotherProfessionId`, `MotherDeptId`, `MotherDesgId`, `MotherBussiness`, `MotherWorkSpace`, `MotherAnnualIncome`, `ResidentPhone`, `FatherCellNo`, `MotherCellNo`, `FatherEmail`, `MotherEmail`, `EmergencyPhone`, `EmergencyCellNo`, `EmergencyContactPerson`, `EmergencyContactRelation`, `BusRateId`, `RouteNo`, `Height`, `Weight`, `VisionLeft`, `VisionRight`, `Teeth`, `OralHygine`, `BrotherSisterDetail`, `SiblingId`, `SessionId`) VALUES (:StudentId, :addmission_no, STR_TO_DATE(:ad_date', '%m/%d/%Y'), :addmission_yr, :addmission_cls, :student_code, :registration_no, :enquiry_no, :student_name, :father_name, :mother_name, :address, :city, :state, :class, :section, :group, :rollno, :gender, :bloodgroup, STR_TO_DATE(:dob', '%m/%d/%Y'), STR_TO_DATE(:doj', '%m/%d/%Y'), :game, :pidmark, :caste, :religion, :concession_cat, :board_addmission_noIX_X, :board_addmission_noXI_XII, :board_roll_noIX_X, :board_roll_noXI_XII, :nationality, :father_prof, :father_dept, :father_desg, :father_bussiness, :father_workplace, :father_annual_income, :mother_prof, :mother_dept, :mother_desg, :mother_bussiness, :mother_workplace, :mother_annual_income, :resident_phone, :father_cell, :mother_cell, :father_email, :mother_email, :emergency_phone, :emergency_cell, :contact_person_emergency, :emergency_contact_relation, :bus_rate, :route_no, :height, :weight, :vision_left, :vision_right, :teeth, :oral_hygiene, :brother_sister_detail,:sibling_id, :session_id)");

            $res = $qre->execute(array(
                ':StudentId'                    =>  $StudentId,
                ':addmission_no'                =>  $addmission_no,
                ':ad_date'                      =>  $addmission_date,
                ':addmission_yr'                =>  $addmission_yr,
                ':addmission_cls'               =>  $addmission_cls,
                ':student_code'                 =>  $student_code,
                ':registration_no'              =>  $registration_no,
                ':enquiry_no'                   =>  $enquiry_no,
                ':student_name'                 =>  $student_name,
                ':father_name'                  =>  $father_name,
                ':mother_name'                  =>  $mother_name,
                ':address'                      =>  $address,
                ':city'                         =>  $city,
                ':state'                        =>  $state,
                ':class'                        =>  $class,
                ':section'                      =>  $section,
                ':group'                        =>  $group,
                ':rollno'                       =>  $rollno,
                ':gender'                       =>  $gender,
                ':bloodgroup'                   =>  $bloodgroup,
                ':dob'                          =>  $dob,
                ':doj'                          =>  $doj,
                ':game'                         =>  $game,
                ':pidmark'                      =>  $pidmark,
                ':caste'                        =>  $caste,
                ':religion'                     =>  $religion,
                ':concession_cat'               =>  $concession_cat,
                ':board_addmission_noIX_X'      =>  $board_addmission_noIX_X,
                ':board_addmission_noXI_XII'    =>  $board_addmission_noXI_XII,
                ':board_roll_noIX_X'            =>  $board_roll_noIX_X,
                ':board_roll_noXI_XII'          =>  $board_roll_noXI_XII,
                ':nationality'                  =>  $nationality,
                ':father_prof'                  =>  $father_prof,
                ':father_dept'                  =>  $father_dept,
                ':father_desg'                  =>  $father_desg,
                ':father_bussiness'             =>  $father_bussiness,
                ':father_workplace'             =>  $father_workplace,
                ':father_annual_income'         =>  $father_annual_income,
                ':mother_prof'                  =>  $mother_prof,
                ':mother_dept'                  =>  $mother_dept,
                ':mother_desg'                  =>  $mother_desg,
                ':mother_bussiness'             =>  $mother_bussiness,
                ':mother_workplace'             =>  $mother_workplace,
                ':mother_annual_income'         =>  $mother_annual_income,
                ':resident_phone'               =>  $resident_phone,
                ':father_cell'                  =>  $father_cell,
                ':mother_cell'                  =>  $mother_cell,
                ':father_email'                 =>  $father_email,
                ':mother_email'                 =>  $mother_email,
                ':emergency_phone'              =>  $emergency_phone,
                ':emergency_cell'               =>  $emergency_cell,
                ':contact_person_emergency'     =>  $contact_person_emergency,
                ':emergency_contact_relation'   =>  $emergency_contact_relation,
                ':bus_rate'                     =>  $bus_rate,
                ':route_no'                     =>  $route_no,
                ':height'                       =>  $height,
                ':weight'                       =>  $weight,
                ':vision_left'                  =>  $vision_left,
                ':vision_right'                 =>  $vision_right,
                ':teeth'                        =>  $teeth,
                ':oral_hygiene'                 =>  $oral_hygiene,
                ':brother_sister_detail'        =>  $brother_sister_detail,
                ':sibling_id'                   =>  $sibling_id,
                ':session_id'                   =>  $session_id
            ));


            var_dump($qre->errorInfo());
            var_dump($qre->errorCode());

提前致谢........

0 个答案:

没有答案