Saturday, July 25, 2009

Re: saveField updates more than the field

Hi

You would like to use something like:

$this->query("Update table set yourfield='yourvalue'");

On Jul 25, 2:07 am, delocalizer <conrad.leon...@hotmail.com> wrote:
> Surely the whole point of 'modified' and 'created' is that they are
> updated automagically every time a record is modified or created!
> Otherwise why would you include them in your table with the names that
> cake will recognize? You could always define a custom field 'altered'
> or something that you save explicitly only when you want to.
>
> On Jul 24, 9:51 pm, "Dave Maharaj :: WidePixels.com"
>
>
>
> <d...@widepixels.com> wrote:
> > I have
>
> > $this->Calculations->saveField('percent', $percent); which saves a math
> > formula to the field....
>
> > But "modified" field is also getting updated which I do not want. Can we
> > specify that we only want the one field saved? Or just use save() and
> > include the fields we want to save instead of saveField?
>
> > Thanks
>
> > Dave- Hide quoted text -
>
> - Show quoted text -

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: