What am I doing wrong in this sql:
Update products
Set products.products_status = 0
Where products.products_id = products_to_categories.products_id And
products_to_categories.categories_id = 114
The error I am getting is: #1054 – Unknown column ‘products_to_categories.products_id’ in ‘where clause’ but that column does exist and I checked the spelling.
the reason for that is you didn’t specify the table
products_to_categorieson theUPDATEstatement. You can join the table even withupdatestatement though, try,