Name | UID | Late |
---|---|---|
Tin | ABC | 0 |
Bob | ABC | 0 |
SELECT * FROM `logs` WHERE Name='Tin' AND Name='Feryal'
This query returns nothing for me and only works when I want one name. I could use the SELECT * but for this case I would like to call specific names in the query?
Advertisement
Answer
For this use In clause.
SELECT * FROM logs WHERE Name IN ('Tin', 'Feryal');
You can also use or clause
SELECT * FROM logs WHERE Name='Tin' OR Name='Feryal'