Jump to content

Exécution automatique de requête SQL


Recommended Posts

Bonjour,

 

Je souhaite que chaque à chaque modification dans la liste des produits deux requêtes SQL s'exécute automatiquement. 

 

mysql_query('UPDATE ps_product_shop SET active=0 WHERE id_product IN (SELECT id_product FROM ps_stock_available WHERE quantity=0)');
 
mysql_query('UPDATE ps_product_shop SET active=1 WHERE id_product IN (SELECT id_product FROM ps_stock_available WHERE quantity>0)');
 
Comment faire ?
 
Merci
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...