Table Name: user_post
id user_id post
1 2 hi ths is aaaaa
2 3 hi ths is yyyyyy
Table Name: user_block
id post_id user_id block_id status
1 1 2 4 1
Please tell me the select query in blocked user all posts should be hide my query is:
SELECT * FROM `user_block`
WHERE `id` NOT IN (
SELECT `post_id` FROM `user_block`
WHERE `user_id` = '{$userID}'
AND `status` = '1'
)
But this query doesnot hide blocked user all posts