Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Save() multiple times not working?
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:
Follow-up To:
Add Cc | Add Follow-up 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 that you hear
 
GoalTribe  
View profile   Translate to Translated (View Original)
 More options 4 Nov, 23:21
From: GoalTribe <ro...@goaltribe.com>
Date: Wed, 4 Nov 2009 15:21:53 -0800 (PST)
Local: Wed 4 Nov 2009 23:21
Subject: Save() multiple times not working?
Why doesn't save() work multiple times in the same action?

I have an action that my cron job calls to see which members need
reminders.

It loops through all members to check. I would like to add an entry
into my event log table for each member that gets a reminder. However,
only the first call to save() seems to work.

What am I doing wrong?

Here is my code:

                               $new_event_data2 = array(
                                                'Event' =>   array(
                                                                                'user_id'       =>   $fbid,
                                                                                'event' =>   "email",
                                                                                )
                                                                        );

                                                $this->Event->save($new_event_data2);

Thanks so much for your help!

This is for a Facebook App called "The 30 Day Fitness Challenge"
running on CakePHP. See it live here: http://www.facebook.com/apps/application.php?id=143111604747


    Reply    Reply to author    Forward  
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.
hunny  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 06:41
From: hunny <saurabh85maha...@gmail.com>
Date: Wed, 4 Nov 2009 22:41:56 -0800 (PST)
Local: Thurs 5 Nov 2009 06:41
Subject: Re: Save() multiple times not working?
After the call $this->Event->save($new_event_data2);
Write the following line

$this->Event->id = null;

It should work fine.

On Nov 5, 4:21 am, GoalTribe <ro...@goaltribe.com> wrote:


    Reply    Reply to author    Forward  
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.
Miles J  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 06:53
From: Miles J <mileswjohn...@gmail.com>
Date: Wed, 4 Nov 2009 22:53:06 -0800 (PST)
Local: Thurs 5 Nov 2009 06:53
Subject: Re: Save() multiple times not working?
Or call $this->Event->create() before the next save.

On Nov 4, 10:41 pm, hunny <saurabh85maha...@gmail.com> wrote:


    Reply    Reply to author    Forward  
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.
GoalTribe  
View profile   Translate to Translated (View Original)
 More options 10 Nov, 06:31
From: GoalTribe <ro...@goaltribe.com>
Date: Mon, 9 Nov 2009 22:31:09 -0800 (PST)
Local: Tues 10 Nov 2009 06:31
Subject: Re: Save() multiple times not working?
Excellent! $this->Event->create()  worked perfectly.

Thanks Miles & hunny!

On Nov 4, 10:53 pm, Miles J <mileswjohn...@gmail.com> wrote:


    Reply    Reply to author    Forward  
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 »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google