hi guys,
I need to put the following sql query into php file so I can run it from cron job, the query is:
UPDATE ps_product_shop SET visibility="none" WHERE id_product IN (SELECT id_product FROM ps_stock_available WHERE quantity=0); UPDATE ps_product_shop SET visibility="both" WHERE id_product IN (SELECT id_product FROM ps_stock_available WHERE quantity>0);
I have no clue where to start, if I run this query in PhpMyAdmin it works very well, but how to implement it into php so we can easily cron it?