I have a table A with 3 columns: SubmissionId, FieldName and FieldValue.
1) SubmissionId save the submission ID.
2) FieldName and FieldValue save respectively the name of a form field and its value.
I have a form with 3 fields: Name, email and status. If 4 submissions have been done, in total there will be 12 records: 3 for each submission.
How do I recover the 3 records of a submission if the submission's status field is equal to the "open" string?
Can you? I start with this, but evidently only retrieves the record that contains the "status" field. I need the other 2 fields.
->where($db->quoteName('b.FieldName') . ' = \'estatus\' AND ' . $db->quoteName('b.FieldValue') . ' = \'abierto\'' )