Our web team supports a number of internal clients who manage their own forms. One group recently ran into a problem where users who complete the form get the following SQL error:
SQL:  select A.element_id, A.option_id, (select if(B.element_matrix_parent_id=0,A.option, (select C.
option from ap_element_options C where C.element_id=B.element_matrix_parent_id and C.form_id=A.form_id and C.live=1 and C.option_id=A.option_id)) ) 'option_label' from ap_element_options A left join ap_form_elements B on (A.element_id=B.element_id and A.form_id=B.form_id) where A.form_id=? and A.live=1 and B.element_status=1 and B.element_type='matrix' order by A.element_id,A.option_id asc Params: 1 Key: Position #0: paramno=0 name= "" is_param=1 param_type=2 Query Failed: SQLSTATE: Cardinality violation: 1242 Subquery returns more than 1 row
From searching online, I've seen that this has been an error several MachForm users have encountered and is related to Matrix Choice questions. I've never seen what the solution is, though, or if there is a way to avoid it in the future.
Feinberg School of Medicine