S
S
Sergey Oganezov2015-11-22 16:17:14
PHP
Sergey Oganezov, 2015-11-22 16:17:14

How to get value from two tables in one query?

There are two tables "company" - companies are stored there and "market" - stores are mainly stored in it, but companies are also present. These two tables have the same columns, but "market" has an additional "comp" column that separates stores and companies in it.
You only need to display companies from these tables. Those. everything that is in the "company" table, and from the "market" table, everything in the "comp" column = 1.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nicholas, 2015-11-22
@Oganez09

Make union of two requests.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question