You have a request for

 /foo/checkin/9

and you ALSO have another separate request for

 /foo/checkin/
OR
 /foo/checkin/xxx

Check with e.g. firebug or simply log the current url and referer.

As a side note, any action that does something should not be  GET request.

AD

On Tuesday, 14 August 2012 23:50:23 UTC+2, zedb wrote:
>
> I'm using 1.3.15
>
>   function checkin($id = null){
>     $this->Scan->id = $id;
>     $this->Scan->saveField('status', 1);
>   }
>
> That is all the code.  It *works* in that it changes the status value of 
> the proper record to 1, but it ALSO adds a new, second row to the table 
> where everything is blank (or set to default).  Debug only returns one 
> query that makes any changes: UPDATE `scans` SET `status` = 1 WHERE 
> `scans`.`id` = 9.  Which is fine.  There are no INSERTs listed anywhere in 
> the debug.
>
> Please help.  This is so simple and it's driving me crazy.
>
>
>
> Also, $this->Scan->id = $id; doesn't actually do anything, despite the 
> cookbook telling me I need to have it.  Behavior is identical if I comment 
> that line out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to