Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to select two or more element in SQL table?

Please note I’m a beginner in SQL and PHP and I search =every where but didn’t found anything useful
I want to select two data from the following table.

id name
1 Joe
2 John

my code

else if($_SESSION['name']=='Joe')

I tried use this syntax but didn’t work ==’Joe’, ‘John’, ==(‘Joe’, ‘John’)
Please help me

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

select name from table where name in ('joe','john')
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading