Saturday, August 29, 2009

Re: Problems with updateAll

because the database isnt made in design pattern, and doesnt have the
field ID, and I need to update directly the field memb___id as it was
a primary key, but I cant transform it into one. so i think it should
exist a method called only "update" to update directly the data. I
dont think select first is necessary, cause you check the record
before the update. so my only solution is use query() method. =/

the only thing I didnt like in Cake was it. I think if it is "taken
off" from rails, it should works like it. in rails, you the
possibility to update only want update.
Thx all for support

Just one last thing, when I used this
$this->Account->updateAll(array('Account.bloc_code' => 0), array
('Account.memb___id' => $account['Accountconfirm']['memb___id']))
being $account['Accountconfirm']['memb___id'] = 'mylogin'

it worked like a charm. but with my new update (memb__pwd etc etc etc)
it didnt work as this one =/
Really cant understand

On 29 ago, 08:06, WebbedIT <p...@webbedit.co.uk> wrote:
> You have us confused, at present I can't see an issue as my solution
> yesterday seems to have worked, but you're not happy with the way it
> works?!?
>
> Cake has a built in check to make sure a record exists before it
> attempts to carry out an update (the select call you're seeing) ... in
> what way is interfering with the working of your app?  As long as the
> correct record is updated, why are you concerned about the exact SQL
> being used.
--~--~---------~--~----~------------~-------~--~----~
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: