Thanks a lot! They are quite useful.


On Apr 1, 6:13 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> Tickets go onhttps://trac.cakephp.org
>
> However, if you search there you will find a few tickets on the same
> topic, such as:https://trac.cakephp.org/ticket/3029
>
> "The purpose of updateAll() is to allow updating of fields based on
> calculated values of other fields. Hence, strings are not supposed to
> be quoted. Optional support for in-method quoting may be added later."
>
> On Apr 1, 1:43 am, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > Hi all,
>
> > I am new to the cake group, thanks for see the thread.
>
> > I was trying to use updateAll() and being stuck for a while. not sure
> > it is a bug or something special, would somebody please  identify it.
> > And how can I report a bug?
>
> > The following query works in 1.2.0.6311:
>
> > $this->Fruit->updateAll(array("color" => "'yellow'"),
> >                                      array("Fruit.name" =>
> > "lemon"));
>
> > it will be interpreted to:
>
> > UPDATE `fruits` AS `Fruit` SET `Fruit`.`color` = 'green' WHERE `name`
> > = 'lemon'
>
> > Two problems come with the array elements:
>
> >    1. The field intended to update can not be defined as
> > "Fruit.color", otherwise a reluctant table name will be added to the
> > generated query (... SET `Fruit`.`Fruit`.`color` = ...)
> >    2. The new value of the field can not be quoted as "yellow", but
> > "'yellow'", which loses consistency with the condition array value
> > given "lemon".

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

Reply via email to