Re: Creating new rows

2010-02-14 Thread WebbedIT
No. You need to give us something more to work with as something is obviously wrong in your controller for save to be called twice. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are

Re: Creating new rows

2010-02-13 Thread WebbedIT
The main question is, is it supposed to be creating two rows? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: Creating new rows

2010-02-13 Thread Jeremy Burns
No. Jeremy Burns jeremybu...@me.com On 13 Feb 2010, at 08:20, WebbedIT wrote: The main question is, is it supposed to be creating two rows? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because

Re: Creating new rows

2010-02-13 Thread Akeda Bagus
On Fri, Feb 12, 2010 at 6:07 PM, Jeremy Burns jeremybu...@me.com wrote: I have this function in the items model: function addNewItem() {        $this-save();        $itemId = $this-id;        return $itemId; } How your controller called it? -- regards, gedex blog:

Creating new rows

2010-02-12 Thread Jeremy Burns
I have this function in the items model: function addNewItem() { $this-save(); $itemId = $this-id; return $itemId; } When called from a controller it does what it is supposed to do; creates a new row in the table and returns the id of the new row. Here's the odd

Re: Creating new rows

2010-02-12 Thread anl hp
try with this: $itemId = $this-getLastInsertID(); -- anl On Fri, Feb 12, 2010 at 12:07 PM, Jeremy Burns jeremybu...@me.com wrote: I have this function in the items model: function addNewItem() { $this-save(); $itemId = $this-id; return $itemId; } When called