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
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
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
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:
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
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