Answer the question
In order to leave comments, you need to log in
How to make a MySQL SELECT query from 2 tables based on multiple values?
Hello, there are 2 tables
1 table showing product id and product model
+----------+-----------+
| id | model |
+----------+-----------+
| 1001 | Апельсин |
| 1002 | Лимон |
| 1003 | Вишня |
| 1004 | Калина |
+----------+-----------+
+----------+-----------+------------------+
| id | category | main_category |
+----------+-----------+------------------+
| 1001 | 1 | 0 |
| 1001 | 2 | 0 |
| 1001 | 3 | 0 |
| 1002 | 1 | 0 |
| 1002 | 7 | 1 |
| 1003 | 1 | 0 |
| 1003 | 4 | 1 |
| 1003 | 8 | 0 |
| 1003 | 10 | 0 |
| 1004 | 1 | 0 |
| 1004 | 2 | 0 |
| 1004 | 5 | 0 |
+----------+-------------+----------------+
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