We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

can we do transactions in phalcon over two actions

Can we do transctions over 2 actions in the controller... i mean i have started $db-begin() in one action and i want to commit the data ($db->commit()) in the other action of the same controller.



85.5k

transactions are wraped in try/catch i guess you you try that it will be an syntax error.

You can just call a static method from some utils/db class or whatever ?

I am deleting this one in an hour https://forum.phalcon.io/discussion/14977/can-we-return-multiple-forms

Using forward i guess yes. If doing whole diffrent action - i guess not.

Even w/o dispatcher/forward that will work, as you're in the same class scope.

You simply call another internal method via $this->myOtherMethod().