Hi, I want to use a update function in my controller that flips a boolean field only.
I call the page with http://website/mode/flip/slug When this function is called, it should check whether the database entry for "slug" in "model" contains a 0 or a 1, additionaly it should write the opposite value back. How should I accomplish this? i used $item = $this->Country->findBySlug($slug); to access the data, but this leaves me with an array instead of an object. Is there any other way to instantiate a object with a similar function like findbyslug which allows me to make changes in the data $this- >Country->boolean = 0, and then $this->Country->save(), to execute the changes? thanks ps. as you might have noticed I'm pretty new to CakePHP, but I'm trying to make the swicth. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
