Jump to content

Setting products on " not active" trough SQL query


Recommended Posts

Hello

 

i am trying to unpublish products from a given supplier using this query

 

update ps_product_shop set active = 0 where id_product in (select id_product from ps_product_supplier where `id_supplier` = 1)

 

but it does not seems to work correctly

 

atfer i have run the query the value 'active' in table ps_product is set on '0' but the products are still visible on the site

 

is the active button in BO affecting some other table when the value is changed?

 

What am i doing wrong?

 

thank you

Link to comment
Share on other sites

thank you musimaster i think you found the problem

 

is anybody able to modify this query in order to update both tables?

 

update ps_product_shop set active = 0 where id_product in (select id_product from ps_product_supplier where `id_supplier` = 1)

 

thank you

Link to comment
Share on other sites

i got it

 

update ps_product_shop set active = 0 where id_product in (select id_product from ps_product_supplier where `id_supplier` = 22)
 
update ps_product set active = 0 where id_product in (select id_product from ps_product_supplier where `id_supplier` = 22) 
Link to comment
Share on other sites

×
×
  • Create New...