0

Something like databases transactions rollback function, but this would work for all above operations, not only database. For example:

 first query for my database
 send service to first other server 

 second query for my database
 send service to second other server


 if (some condition) {
     here need  cancel all above operations.
     if use database transaction `rollback` function, my database changes are canceled.
     There is possible, that cancel service sending (or may be some other, not only database) operations also? 
 }

Is there anything possible that cancel all previous operation in php?

Oto Shavadze
  • 40,603
  • 55
  • 152
  • 236
  • The devil is in the details here. What operations will "first other server" and "second other server" accept? Do you control them? If so, you could apply transaction start/transaction commit/rollback functionality. Or simply hold and queue the external calls until you can test `some condition`; hard to say if this is possible from your example. – Digital Chris Jun 10 '14 at 11:54
  • You cannot cancel the sending, but have you heard about distributed transactions? Mysql: http://dev.mysql.com/doc/refman/5.7/en/xa.html – Marek Jun 10 '14 at 12:30

0 Answers0