Are you including the Model.id field in your edit form view?
?php echo $form-create(Model); ?
?php echo $form-input(Model.id); ? -- important line
?php ... rest of fields in your form ?
?php echo $form-end(Submit); ?
On Jan 16, 4:37 pm, mona poojapinj...@gmail.com wrote:
Here is my edit
On Jan 16, 5:37 pm, mona poojapinj...@gmail.com wrote:
snip
if (empty($this-data)){
if (!$id){
$this-Session-setFlash('Invalid id for Entry');
What is that supposed to do? You won't find that sort of check in the
blog tutorial or baked code.
OK, I've responded about this exact code before. Just rewrite the
function with Cake conventions, and remove the direct MySQL updates
and you should be fine.
Your code is updating the record after the save, when you could simply
do the save with the query value from the count query, which should
Here is my edit function code i don't know where i mistaken if i edit
my record it added automatically one new record and i didn't get
validation messages also below is my edit function code
function edit($id = null){
$this-set('sections', $this-Entry-Section-find
('list',array