Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
JOMLA 2.5 transactionCommit and transactionRollback
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Evandromar Machado  
View profile  
 More options Aug 17 2012, 7:09 pm
From: Evandromar Machado <evandromar.mach...@gmail.com>
Date: Fri, 17 Aug 2012 16:09:47 -0700 (PDT)
Local: Fri, Aug 17 2012 7:09 pm
Subject: JOMLA 2.5 transactionCommit and transactionRollback

Hello folks, with very basic example will try to show what I need.
I need to create related records in other tables as possso use as a
transaction commit and rollback quano receive an error during save.

*EX 1: In the controller or any other place.*
$contact = & JTable::getInstance ( 'Contact', 'PrefixTable' );
$contactdetails= & JTable::getInstance ( ' ContactDetail', ' PrefixTable '
);

if ($contact->store ()) {
  if($contactdetails->store ()){
OK, contact and contact details saved successfully.
  } else {
Error saving details such as rolling back the contact that was saved?
  }

}

*EX 2: **Another way I like to do it in Model, i think more correct.*

class PrefixModelContact extends JModelAdmin {

       public function save($data) {
     if (parent::save($data)) {
  if($contactdetails->store ()){
OK, contact and contact details saved successfully.
  } else {
Error saving details such as rolling back the contact that was saved?
  }
      }

}
}

Above are just examples, the actual code is much more elaborate.
I use transactionCommit transactionRollback With MYSQL and SQLSERVER or how
to proceed?

Thank you all.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rouven Weßling  
View profile  
 More options Aug 17 2012, 7:32 pm
From: Rouven Weßling <m...@rouvenwessling.de>
Date: Sat, 18 Aug 2012 01:32:30 +0200
Local: Fri, Aug 17 2012 7:32 pm
Subject: Re: [jgen] JOMLA 2.5 transactionCommit and transactionRollback

I think transaction handling would be done inside JTable, not in the model.

Rouven

On 18.08.2012, at 01:09, Evandromar Machado <evandromar.mach...@gmail.com> wrote:

  smime.p7s
6K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evandromar Machado  
View profile  
 More options Aug 18 2012, 7:09 pm
From: Evandromar Machado <evandromar.mach...@gmail.com>
Date: Sat, 18 Aug 2012 16:09:15 -0700 (PDT)
Local: Sat, Aug 18 2012 7:09 pm
Subject: Re: [jgen] JOMLA 2.5 transactionCommit and transactionRollback

Hello, thanks for your reply but I would like some examples of using these
resources.

Em sexta-feira, 17 de agosto de 2012 20h32min30s UTC-3, Rouven Weßling
escreveu:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rouven Weßling  
View profile  
 More options Aug 18 2012, 7:12 pm
From: Rouven Weßling <m...@rouvenwessling.de>
Date: Sun, 19 Aug 2012 01:12:06 +0200
Local: Sat, Aug 18 2012 7:12 pm
Subject: Re: [jgen] JOMLA 2.5 transactionCommit and transactionRollback

Unfortunately neither the CMS nor the platform currently use transactions so I can't point you to any examples. Sorry.

Best regards
Rouven

On 19.08.2012, at 01:09, Evandromar Machado <evandromar.mach...@gmail.com> wrote:

  smime.p7s
6K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »