I am trying to create a script that will remove out of stock items from my featured listings.
This is the script that I have so far, but I am not a SQL geek, so I am stuck trying to get the multi table/join stuff to work.
I can do a proper select and get the right data returned, but the update is failing with SQL Syntax errors.
Can anyone assist?
UPDATE featured.status
SET featured.status = '0'
FROM products Inner Join featured
ON featured.products_id = products.products_id
WHERE products.products_quantity = '0' && featured.status = '1'


Reply With Quote
