What is wrong with this query:
SELECT `product`.`id`, `title` AS `text` FROM `product`
LEFT JOIN `productlang` ON product.id=productlang.product_id
LEFT JOIN `new_product` ON product.id=new_product.product_id
WHERE (`product`.`id` <> `new_product`.`product_id`)
AND (`title` LIKE '%nik%')
AND (`language`='bg')
LIMIT 20
The purpose is to get all products from product table whose id doesn't exist in new_product (product_id is the related column).I tought WHERE (product.id <> new_product.product_id) part should do the trick. Where is my bad ? Thank you!