Khaled Mahmoud
Khaled Mahmoud

Reputation: 302

Can I use multiple parameters when using WHERE in MYSQL

(when selecting data from tables in MYSQL database) something like this:

WHERE some_column = some_value, other_column = other_value

If not, Is there other simple method rather than going into "if loops"

Upvotes: 0

Views: 143

Answers (2)

Viktor
Viktor

Reputation: 3536

Yes, just separate them with ANDs:

WHERE some_column=some_value AND other_column=other_value

Upvotes: 7

Cade Roux
Cade Roux

Reputation: 89671

WHERE some_column = some_value AND other_column = other_value

Upvotes: 3

Related Questions