Answer the question
In order to leave comments, you need to log in
How to select orders from related table with condition?
There are two tables
orders
-id
-name
order_product
-id
-order_id
-importance
How to get all order records where order_product importance is either all zeros or all ones and zeros.
If all order_product importance is 1, then exclude such an order
Answer the question
In order to leave comments, you need to log in
I advise you to read this article, it describes all the horizontal and vertical centering options for inline (including inline-block ) and block elements.
codepen.io/Geyan/pen/WxgVBa
Let's say we need to add another parent block for the text , and then you will see
Learning to use the WHERE EXISTS / NOT EXISTS construct
select
*
from
orders
where
exists (
select
1
from
order_product
where
order_id = orders.id
and importance = 0
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question