I've been asked by a friend to help with some design for a site built a couple of years ago and I've come across a couple of data errors that MySQL should be able to sort out but I'm afraid that my MySQL knowledge is pretty limited.
The situation is a product search and uses the query below...
However, products are being returned that are not supposed to be 'active'.
SELECT products_description.products_id, products_description.language_id, products_to_categories.categories_id
INNER JOIN products_to_categories ON products_description.products_id = products_to_categories.products_id
WHERE products_description.products_name LIKE '%searchterm%'
OR products_description.products_description LIKE '%searchterm%'
There's a table called which has a column called which can be a 1 or 0.
So what I need to do is add to the original query
but can't quite work out the way to do it.
AND product.products_status = 1
Any help would be great.