duanliao5995 2016-01-01 10:56
浏览 21

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

I am trying to save the record, but when I run this code it execute without any error, but in database it does not show my record inserted..... This is my Code for saving the records:-

$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());

Thanks in advance........

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 R语言Rstudio突然无法启动
    • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
    • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
    • ¥15 用windows做服务的同志有吗
    • ¥60 求一个简单的网页(标签-安全|关键词-上传)
    • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值