Answer the question
In order to leave comments, you need to log in
Double query to database?
Good day. Faced the problem of making a double request to the database.
There is a table with this structure
id | id_deals | name | value
1 | 2 | user_id_email | [email protected]
2 | 2 | person_id_phone | 123456789
I need to select unique id_deals where value = [email protected] and value = 123456789
when I execute such a request I get an empty result
SELECT DISTINCT `id_deals` FROM `deals` WHERE deals.value = '[email protected]' AND deals.value = '123456789'
Answer the question
In order to leave comments, you need to log in
I read the condition in the request: "select those people who are both a boy and a girl")
There is no deals.value in nature such that it is both '[email protected]' AND '123456789'
ps from the army "stop there and come here ")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question