|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
oracle/sql help needed
I have a survey form that has 5 questions. 1 of the question has checkboxes to allow for up to 3 answers for that question. I am inserting the answers to an oracle database when they submit the survey. My question is, if they check any of the checkboxes, th value inserted to the table is 'Array'. How do I insert all of their answers to that particular question? Below is my insert statement as it stands now:
$sql="INSERT into sysadm.insrv_survey (SURVEY_NME, SEQ_NBR, NAME, ADDRESS, CITY, STATE, ZIP, EMAIL_ADDR, COUPONS_IND, HEALTHCARE_IND, QUESTION1, QUESTION1_ANS, QUESTION2, QUESTION2_ANS, QUESTION3, QUESTION3_ANS, QUESTION4, QUESTION4_ANS, QUESTION5, QUESTION5_ANS) values (:survey_nme, :seq_nbr, :name, :address, :city, :state, :zip, :email_addr, :coupons_ind, :healthcare_ind, :question1, :question1_ans, :question2, :question2_ans, :question3, :question3_ans, :question4, :question4_ans, :question5, :question5_ans)"; $sql_arg="survey_nme" . DELIM . $survey_nme . DELIM . "seq_nbr" . DELIM . $seq_nbr . DELIM . "name" . DELIM . $Name . DELIM . "address" . DELIM . $Address . DELIM . "city" . DELIM . $City . DELIM . "state" . DELIM . $State . DELIM . "zip" . DELIM . $Zip . DELIM . "email_addr" . DELIM . $Email . DELIM . "coupons_ind" . DELIM . $coupons . DELIM . "healthcare_ind" . DELIM . $healthcare_info . DELIM . "question1" . DELIM . $q_1 . DELIM . "question1_ans" . DELIM . $q1 . DELIM . "question2" . DELIM . $q_2 . DELIM . "question2_ans" . DELIM . $q2 . DELIM . "question3" . DELIM . $q_3 . DELIM . "question3_ans" . DELIM . $q3 . DELIM . "question4" . DELIM . $q_4 . DELIM . "question4_ans" . DELIM . $q4 . DELIM . "question5" . DELIM . $q_5 . DELIM . "question5_ans" . DELIM . $q5; $C= new mydb; $C->my_sqlbnd($sql, $sql_arg); |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > oracle/sql help needed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|