Thanks for the time to read my question. I have a form on my website (Wordpress wp_forms) this generates a database entry wp_wpforms_entry_fields where the entries for the form are stored. My form contains three fields (Name, Email address and a Yes or No question).
In my database this creates the following table:

What I'm trying to do is get the field_id from 1 and 3. So with my SQL I do the following:
$query = "SELECT *
FROM wp_wpforms_entry_fields
WHERE field_id = 1";
But this only selects the value from field_id 1 what I would like is to also have the value from WHERE field_id 3 = Yes. This way I can show the names of people who gave a positive answer to the question.
I have no idea where to start, this is probably not as difficult as I'm making it. But doing:
$query = "SELECT *
FROM wp_wpforms_entry_fields
WHERE field_id = 1
AND field_id = 3
AND IS Yes";
Surely doesn't work... thanks again for reading.
PS. I've left out the database connection rules because the connection works, I can retrieve data based on the first SELECT. But I can't seem to get the separation between Yes and No.
entry_id = 8.entry_iddoes not seem to have any relation withfield_idyesanswer,entry_idis not needed.