kenkomuri Posted November 15, 2016 Share Posted November 15, 2016 Buen día, Los puntos del módulo de fidelidad se encuentran siempre en estado "en espera de validación" aún cuando cambia el estado a Enviado que se supone debe de cambiar el estado de los puntos a disponibles. Como alternativa he creado 2 queries en SQL: #Acreditar UPDATE pr_loyalty as lo INNER JOIN pr_orders as ord ON lo.id_order = ord.id_order SET lo.id_loyalty_state = 2 WHERE ord.current_state = 4 AND (lo.id_loyalty_state = 3 OR lo.id_loyalty_state = 1); COMMIT; #Cancelar UPDATE pr_loyalty as lo INNER JOIN pr_orders as ord ON lo.id_order = ord.id_order SET lo.id_loyalty_state = 3 WHERE ord.current_state = 6 AND (lo.id_loyalty_state = 2 OR lo.id_loyalty_state = 1); COMMIT; Sin embargo necesito crear un archivo php para dejarlo corriendo ambos en un cronjob y allí es dónde no he podido? Qué me recomiendan? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now