Answer the question
In order to leave comments, you need to log in
How to make double condition in SQL query?
When creating a blog site, I ran into a problem.
I can't figure out how to make a double condition in a SQL query,
here's the code:
SELECT * FROM `comics` WHERE `categories_id` = '17' OR `categories_id_2` = '17' OR `categories_id_3` = '17' OR `categories_id_4` = '17' OR `categories_id_5` = '17' OR `categories_id_6` = '17' OR `categories_id_7` = '17' OR `categories_id_8` = '17' AND `categories_id` = '1' OR `categories_id_2` = '1' OR `categories_id_3` = '1' OR `categories_id_4` = '1' OR `categories_id_5` = '1' OR `categories_id_6` = '1' OR `categories_id_7` = '1' OR `categories_id_8` = '1' ORDER BY `id` DESC
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question