Thank you for you quick answer.
Any way to do that operation in a standard way?

Thanks,
Mateo

On 22 jun, 00:45, "Adam Royle" <[email protected]> wrote:
> Yes. You must start and end atransactionwith the same mysql connection.
> MySQL connections are automatically closed once the page has finished
> executing. Aredirectstops the current page execution.
>
> Cheers,
> Adam
>
> ----- Original Message -----
> From: "Mateo San Román" <[email protected]>
> To: "CakePHP" <[email protected]>
> Sent: Monday, June 22, 2009 2:49 PM
> Subject: transactions +redirectdoesn't work!
>
> > Hello
>
> > I have this code:
>
> > function A () {
> > $this->query('BEGINTRANSACTIONA');
> >  xxx
> >  xxx
> >  $this->redirect('/controller/B);
> > }
>
> > function B () {
> > xxx
> > xxx
> > $this->query('COMMITTRANSACTIONA');
> > }
>
> > doesn't work  because there is a missing "BEGINTRANSACTION"
>
> > However, if I use instead
>
> > $this->query('BEGINTRANSACTIONA');
> >  xxx
> >  xxx
> >  $this->B();
> > }
>
> > It works somehow. Any ideas about this? Doesredirectautomatically
> > shuts down existingtransaction?
>
> > Thanks a lot
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to