Re: Save and Loops

2010-12-30 Thread Mark
. Another weird thing is that when the number of appointments is 20+, it will fail both the first and the 20th+ iterations. (rows 2-19 get inserted just fine). I've tried looking for other topics involving save and loops, but still couldn't find a solution. I'm placing here the code

Save and Loops

2010-12-29 Thread Mark
is that when the number of appointments is 20+, it will fail both the first and the 20th+ iterations. (rows 2-19 get inserted just fine). I've tried looking for other topics involving save and loops, but still couldn't find a solution. I'm placing here the code for your reference. Thank you

Re: Save and Loops

2010-12-29 Thread Amit Badkas
looking for other topics involving save and loops, but still couldn't find a solution. I'm placing here the code for your reference. Thank you in advance, Mark //PHP Code Starts Here $program = $this-Enrollment-Program-read(null, $this- data['Enrollment']['program_id']); for($i=1;$i=$program

setting id to null in active record before doing a save within loops

2006-10-20 Thread Gil Vidals
Why is it necessary, when adding multiple records in a while or for loop to set the active record's id to null??? $this-Model-id = 'null'; $this-Model-save(...) If the active record's id is *not* set to null, only the first record is inserted and the rest simply do an update to the

Re: setting id to null in active record before doing a save within loops

2006-10-20 Thread scott lewis
On 20-Oct-2006, at 14:48, Gil Vidals wrote: Why is it necessary, when adding multiple records in a while or for loop to set the active record's id to null??? $this-Model-id = 'null'; $this-Model-save(...) If the active record's id is *not* set to null, only the first record is