Answer the question
In order to leave comments, you need to log in
How not to take records from the first table if there is one in the second one?
Two tables
`material` (
`id` int(11) NOT NULL,
`created_by` int(11) NOT NULL,
)
`blacklist` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL ,
`created_by` int(11) NOT NULL,
)
I need to take all the rows from the first table if in the second in the user_id field there will be created_by from the first and created_by from the second will be equal to for example 3
How it works - the user is logged in and he does not see some records from the first table if another user is on the black list.
i.e. select * from material
if material.created_by != blacklist.user_id
and blacklist.created_by = 3
something like this (((he got confused already. Please tell me with a request
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