Re: Simple Poll
h i think i need to fix your models as below : Poll hasMany Choice Choice hasMany ChoiceResult or PollResult That;s just my idea. Then...you should save your polling result to ChoiceResult model or choice_result table. *choice_result* table : id choice_id other_result sample data : id | choice_id | other_result 1 | 1|NULL 2 | 2|NULL 3 | 4|"hmmm i don't know about that" 4 | 2|NULL #notes: 4 is "Other" Next... you can find("count") WHERE choice_id = 1,2,3,4 2013/1/25 Advantage+ > I need to create a simple poll for users and stumped on saving the results > when user submits the poll. > > ** ** > > Poll hasMany Question > > Poll hasMany Result > > Question hasMany Choice > > Pretty simple, but how do you save the results since viewing the poll > creates a form to save Poll? > > ** ** > > View the poll/$id pulls all the questions and choices for each, but how / > where to save the results? > > What would be the correct table for this? poll_results? results? > > ** ** > > Thanks, > > ** ** > > Dave > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cake-php+unsubscr...@googlegroups.com. > To post to this group, send email to cake-php@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- *Coklat Stroberi -- Web Dev Training Centre* http://www.facebook.com/pages/Coklat-Stroberi/249514251728226 (info lebih lanjut) http://coklatstroberi.net Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau 08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan perumahan dalung permai. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Creating objects from the parent object of a hasmany relationship in a controller
Just pass your POST request http://davidwalsh.name/curl-post 2013/1/11 Sam Marland > I am creating a web application that stores user's journeys and I'm build > this application in CakePHP 2.2.5. > > I have a Journey model and that journey model has many coordinate objects > which store the lat long coordinates. > > I want to create a REST API to create journeys that accepts JSON in the > body which will contain information detailing the journey as well as > detailing coordinates, to create the coordinates objects that should be > attached to the journey object all in one controller method. > > I'm not sure where to start. > > Here is the code for the add function in the journeys controller > > public function add() { > if ($this->request->is('post')) { > $this->Journey->create(); > if ($this->Journey->save($this->request->data)) { > $this->Session->setFlash(__('The journey has been saved')); > $this->redirect(array('action' => 'index')); > } else { > $this->Session->setFlash(__('The journey could not be saved. > Please, try again.')); > } > } > $users = $this->Journey->User->find('list'); > $this->set(compact('users'));} > > Any help would be appreciated. > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > 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+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- *Coklat Stroberi -- Web Dev Training Centre* http://www.facebook.com/pages/Coklat-Stroberi/249514251728226 (info lebih lanjut) http://coklatstroberi.net Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau 08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan perumahan dalung permai. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: authentication and authorization is not working
repeat and repeat again your effort.. try and error.. 2012/12/13 ashy > Hello All, > > I am following the tutorial below > > http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#identifying-users-and-logging-them-in > > The password is not getting hashed by user add method. Thats the reason, > authentication is not getting completed. Any ideas? > > thanks > ashy > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > 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+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- *Coklat Stroberi -- Web Dev Training Centre* http://www.facebook.com/pages/Coklat-Stroberi/249514251728226 (info lebih lanjut) http://coklatstroberi.net Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau 08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan perumahan dalung permai. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Cake is not automatically single quoting SQL string when doing Model::updateAll()
@euromark Ok.. thank you :) 2012/12/13 euromark > see the documentation or lots of google results like > http://stackoverflow.com/questions/6988160/cakephp-updateall-issues > they all state the same: you need to manually escape for updateAll() > > > Am Mittwoch, 12. Dezember 2012 18:45:50 UTC+1 schrieb polutan polution at > all: > >> I get SQL error when doing Model::updateAll() . The error appeared >> because my data string not quoted with single quote. It seems cake is not >> automatically single quoting my data. >> >> This is the screenshoot. Please check this out : >> http://img546.imageshack.us/**img546/2289/**localhosttaskmonusersed.png<http://img546.imageshack.us/img546/2289/localhosttaskmonusersed.png> >> >> This is my code : >> $data = array( >> "User.username" => >> "'".$this->request->data["**User"]["username"]."'", >> // I Manually single quoting the data >> "User.group_id" => $this->request->data["User"]["** >> group_id"], >> "User.modified" => date("Y-m-d H:i:s") // the error come >> from here >> ); >> >> $conds = array( >> "User.id" => (int) $this->request->data["User"]["**id"] >> ); >> >> if (!empty($this->request->data["**User"]["password"])) { >> $data["User.password"] = "'".AuthComponent::password($** >> this->request->data["User"]["**password"])."'"; // I Manually single >> quoting the data >> } >> >> if ($this->User->updateAll($data,**$conds)) { >> $this->Session->setFlash(__('**The user has been >> saved')); >> $this->redirect(array('action' => 'index')); >> >> } else { >> $this->Session->setFlash(__('**The user could not be >> saved. Please, try again.')); >> } >> >> Thank you >> > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > 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+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- *Coklat Stroberi -- Web Dev Training Centre* http://www.facebook.com/pages/Coklat-Stroberi/249514251728226 (info lebih lanjut) http://coklatstroberi.net Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau 08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan perumahan dalung permai. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Cake is not automatically single quoting SQL string when doing Model::updateAll()
I get SQL error when doing Model::updateAll() . The error appeared because my data string not quoted with single quote. It seems cake is not automatically single quoting my data. This is the screenshoot. Please check this out : http://img546.imageshack.us/img546/2289/localhosttaskmonusersed.png This is my code : $data = array( "User.username" => "'".$this->request->data["User"]["username"]."'", // I Manually single quoting the data "User.group_id" => $this->request->data["User"]["group_id"], "User.modified" => date("Y-m-d H:i:s") // the error come from here ); $conds = array( "User.id" => (int) $this->request->data["User"]["id"] ); if (!empty($this->request->data["User"]["password"])) { $data["User.password"] = "'".AuthComponent::password($this->request->data["User"]["password"])."'"; // I Manually single quoting the data } if ($this->User->updateAll($data,$conds)) { $this->Session->setFlash(__('The user has been saved')); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The user could not be saved. Please, try again.')); } Thank you -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Cake is not automatically single quoting SQL string when doing Model::updateAll()
This is better looking code http://pastie.org/5516905 2012/12/13 polutan > I get SQL error when doing Model::updateAll() . The error appeared because > my data string not quoted with single quote. It seems cake is not > automatically single quoting my data. > > This is the screenshoot. Please check this out : > http://img546.imageshack.us/img546/2289/localhosttaskmonusersed.png > > This is my code : > $data = array( > "User.username" => > "'".$this->request->data["User"]["username"]."'", // I Manually single > quoting the data > "User.group_id" => > $this->request->data["User"]["group_id"], > "User.modified" => date("Y-m-d H:i:s") // the error come > from here > ); > > $conds = array( > "User.id" => (int) $this->request->data["User"]["id"] > ); > > if (!empty($this->request->data["User"]["password"])) { > $data["User.password"] = > "'".AuthComponent::password($this->request->data["User"]["password"])."'"; > // I Manually single quoting the data > } > > if ($this->User->updateAll($data,$conds)) { > $this->Session->setFlash(__('The user has been saved')); > $this->redirect(array('action' => 'index')); > > } else { > $this->Session->setFlash(__('The user could not be saved. > Please, try again.')); > } > > Thank you > -- *Coklat Stroberi -- Web Dev Training Centre* http://www.facebook.com/pages/Coklat-Stroberi/249514251728226 (info lebih lanjut) http://coklatstroberi.net Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau 08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan perumahan dalung permai. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Interesting problem with pagination
your *image_portrait* not returned? is that you mean? 2012/11/14 char > Hi all, > > I've got a problem which I hope is interesting to everyone. > > Got a generic table, in which each item has an image and an attribute that > says wether the orientation is portriat or landscape. > > id int(10) unsigned NOT NULL > namevarchar(255) NULL > image varchar(255) NULL > image_portrait tinyint(1) unsigned NOT NULL > > Now I need to paginate the results so that there are always 1 portrait > images for every 2 landscape images. > > So I want a paginate with limit of 6 say, return the following: > > array( > (int) 0 => array( > 'Item' => array( > 'id' => '1', > 'name' => 'container', > 'image' => 'CH1.a.jpg', > > > ) > ), > (int) 1 => array( > 'Item' => array( > 'id' => '2', > 'name' => 'container', > 'image' => 'CH1.a.jpg' > ) > ), > (int) 2 => array( > 'Item' => array( > 'id' => '3', > 'name' => 'container', > 'image' => 'CH1.a.jpg' > ) > ), > (int) 3 => array( > 'Item' => array( > 'id' => '4', > 'name' => 'container', > 'image' => 'CH1.a.jpg' > ) > ), > > > > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > 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+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- *Coklat Stroberi -- Web Dev Training Centre* http://www.facebook.com/pages/Coklat-Stroberi/249514251728226 (info lebih lanjut) http://coklatstroberi.net Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau 08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan perumahan dalung permai. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: [URGENT] Acl::check() is not working
No, that's not what i mean. Administrator can choose a group from a list group, then click "List Access" . After clicking "List Access" button, will open List Access Rights Page. Ahh hard to say :( i think nobody will understand :( aaarrrgghhh.. 2012/11/13 lowpass > This might help: > > > http://bakery.cakephp.org/articles/thanos/2011/01/17/acl_checking_permissions_in_views > > On Mon, Nov 12, 2012 at 1:37 AM, polutan polution at all > wrote: > > i have group's access rights setting page > > http://imageshack.us/f/600/accessrightslist.png/ . > > now i using Acl::check() to check whether an access item is allowed or > > denied, > > if allowed the checkbox is checked. I create my checkbox form using an > > helper > > this is my helper code http://pastie.org/5364102 . > > > > Using Acl::check is so expensive, if i load my access rights setting > page, > > my page have 150+ query. > > 150+ query was caused by Acl::check(). Because i call Acl::check() in > every > > data item in my helper code. > > > > Then, i have an idea. My goal is just make the checkbox checked or > > unchecked. So i don't want to use Acl::check() again for my helper. > > I only use Acl::check() in my controller. So I make my own component to > load > > all data from aros_acos table and > > replace Acl::check() call in my helper using my own method to check. and > > this is my component code http://pastie.org/5364107 . > > > > So, My problem is : > > If i use my own method inside my helper (not using Acl::check() ) : > > if ($this->__checkPermission($item["Aco"]["id"], > > $this->permissions)) > > my Acl::check() inside my controller not working. > > > > if i use Acl::check() inside my helper: > > if ($this->aclComponent->check($this->aroObject, $path)) > > my Acl::check() inside my controller is working good. > > So, this problem make my controller can not insert data to aros_acos. > > This is my controller code http://pastie.org/5364105 -- > > AccessRightsController > > and this is my array structure when data submitted > http://pastie.org/5364125 > > > > Please help me, Thank you :) > > > > -- > > Like Us on FaceBook https://www.facebook.com/CakePHP > > Find us on Twitter http://twitter.com/CakePHP > > > > --- > > 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+unsubscr...@googlegroups.com. > > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > > > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > 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+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- *Coklat Stroberi -- Web Dev Training Centre* http://www.facebook.com/pages/Coklat-Stroberi/249514251728226 (info lebih lanjut) http://coklatstroberi.net Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau 08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan perumahan dalung permai. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
[URGENT] Acl::check() is not working
i have group's access rights setting page http://imageshack.us/f/600/accessrightslist.png/ . now i using Acl::check() to check whether an access item is allowed or denied, if allowed the checkbox is checked. I create my checkbox form using an helper this is my helper code http://pastie.org/5364102 . Using Acl::check is so expensive, if i load my access rights setting page, my page have 150+ query. 150+ query was caused by Acl::check(). Because i call Acl::check() in every data item in my helper code. Then, i have an idea. My goal is just make the checkbox checked or unchecked. So i don't want to use Acl::check() again for my helper. I only use Acl::check() in my controller. So I make my own component to load all data from aros_acos table and replace Acl::check() call in my helper using my own method to check. and this is my component code http://pastie.org/5364107 . So, My problem is : If i use my own method inside my helper (not using Acl::check() ) : if ($this->__checkPermission($item["Aco"]["id"], $this->permissions)) my Acl::check() inside my controller not working. if i use Acl::check() inside my helper: if ($this->aclComponent->check($this->aroObject, $path)) my Acl::check() inside my controller is working good. So, this problem make my controller can not insert data to aros_acos. This is my controller code http://pastie.org/5364105 -- AccessRightsController and this is my array structure when data submitted http://pastie.org/5364125 Please help me, Thank you :) -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Acl::check() the $action parameter and the default vals , what does that mean?
anybody? Please help me 2012/11/5 polutan polution at all > Hello folks :) > I don't understand what does $action param and its default values mean? > Because i can directly write $this->Acl->check("warriors/Aragorn", > "ControllerNames/myMethodName") then it works, i don't need to supply > $action param. > > Then if i do something like at the manual $this->Acl->check( > 'warriors/Aragorn', 'Weapons', 'create'); which method in my > WeaponsController class categorized as 'create' ? . > Then suppose i have reloadAmmunition() method in my WeaponsController > class. So what reloadAmmunition() is? a create or read or update or a > delete? Please somebody help me, i need your enlightenment. > > Thank You :) > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > 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+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- *Coklat Stroberi -- Web Dev Training Centre* http://www.facebook.com/pages/Coklat-Stroberi/249514251728226 (info lebih lanjut) http://coklatstroberi.net Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau 08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan perumahan dalung permai. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Acl::check() the $action parameter and the default vals , what does that mean?
Hello folks :) I don't understand what does $action param and its default values mean? Because i can directly write $this->Acl->check("warriors/Aragorn", "ControllerNames/myMethodName") then it works, i don't need to supply $action param. Then if i do something like at the manual $this->Acl->check( 'warriors/Aragorn', 'Weapons', 'create'); which method in my WeaponsController class categorized as 'create' ? . Then suppose i have reloadAmmunition() method in my WeaponsController class. So what reloadAmmunition() is? a create or read or update or a delete? Please somebody help me, i need your enlightenment. Thank You :) -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Dealing with mysql views in schema generation
is not schema just to generate tables? i think schema just focusing himself to create tables. schema is not a SQL SELECT command. 2012/11/6 Greg Skerman > Hi, > > For one of my projects, I need to join up against some static data in > another database. The data in this database will never be written to by my > application, and the schema does not comply with cake's conventions. I am > not able to change the schema to comply with cake's conventions because > other non-cake applications depend on and have been written to take > advantage of this schema. > > As such, I've turned to mysql views - a simple select query massages the > format into something cake is comfortable with and this works fine for > feeding the static data/lookups on static data into my application. > > The problem comes when I try and generate a schema with the schema shell. > It generates fine but the schema creates entries for the views as if they > were tables, so there is a manual task after the fact to go back in and > remove the entries for the views, and then a manual SQL script to create > the views.. which is prone to user error (if schemas are run but views are > not updated, or views are not removed from schema.php etc). > > Does anyone have a nice elegant way of dealing with views in schema > generation? > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > 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+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- *Coklat Stroberi -- Web Dev Training Centre* http://www.facebook.com/pages/Coklat-Stroberi/249514251728226 (info lebih lanjut) http://coklatstroberi.net Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau 08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan perumahan dalung permai. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Acl's Methods $aro param variations
Halo folks :) I Need to know variations of Acl's methods $aro param format. Hard to understand AclNode::node() method. I want to cache Acl's methods, but i don't know the variations of $aro param. Thank You :) -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
the questions rarely answered. why?
Hello :) i'am so sorry before if this post sounds insulting :) i just want to know, why most of questions here is rarely answered? is all happier using #cakephp instead of cake's google group? why cake's mailing list was not as crowded as in #cakephp irc channel? Thank you :) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Found a sweet routing work around! I'm so close!
Woww... is it like we able to create or add much of subdomain? I mean like social networking site that give their users a special domain like username1.domain.com, username2.domain.com, and so on.. like that? is that true? @John R can u explain me how is ur table structure? i mean as you said above : --- quote -- Here is what I have going on: 1) My app_controller checks the subdomain against the database and makes sure it's valid. If not, it redirect - works great! -- end quote -- Thank you :) On Apr 4, 8:18 am, John R <[EMAIL PROTECTED]> wrote: > That was it! The 'else' worked like a charm. Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Using Multiple Models in a Controller?
add this in your controller var $uses = array('Model2','Model3'); or if not working try to var $uses = array('YourCurrentModelName','Model1','Model2','Model_etc'); for your case. did you want to access Customer model in employees_controller ? just add : var $uses = array('Customer'); or var $uses = array('Employee', 'Customer'); On Jan 7, 2:00 am, Travis <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I have two models, Employee and Customer. Employee belongsTo > Customer. I want to have a view Employee/index/customer_id where I can > have a table view of all employees that belong to a certain > customer. > > How would I go about calling the Customer Model to genrate a data set > that lists all customers ,so that in the Employee/index file I can > generate a dropdown to select the customer to sort the data by. > > I haven't been able to find any examples of something like this > anywhere I have looked. > > Any help would be appreciated. > > Travis --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
error when creating aco | aro with cake console cake 1.2
I got this error when i run this command : cake acl create aco / ROOT Fatal error: Undefined class name 'string' in D:\tohtdocs\MyBand\cake \libs\model \datasources\dbo_source.php on line 1456 what must i have to do ? help me please thank you --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: can not pass null when creating aco or aro
:( hello can someone help me ?? On Jan 3, 3:35 pm, polutan <[EMAIL PROTECTED]> wrote: > hello can anyone help me? i really need to implement ACL soon to my > project.. > > thank you > > On Jan 3, 2:55 pm, Linspirell <[EMAIL PROTECTED]> wrote: > > > Hello friends :) why i can't pass null value when i want to create an > > aro or aco ? i'am using database structure from the tutorial. no > > modification i did at the structure. i just copy and paste form the > > tutorial. So, the field that contain parent_id is allowed null value. > > i read tutorial from IBM. > > > i try this command : > > php acl.php create aco 1 null "Tor Johnson School Of Drama" > > and appear error that state parent_id can't be a null value > > > but as i read in this bakery tutorial, i didn't see the tutorial > > author passing null to object_id when defining ACO and passing null to > > foreign_key when defining ARO. i got confused by IBM tutorial, why > > they must pass null value ? > > > thank you --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: can not pass null when creating aco or aro
hello can anyone help me? i really need to implement ACL soon to my project.. thank you On Jan 3, 2:55 pm, Linspirell <[EMAIL PROTECTED]> wrote: > Hello friends :) why i can't pass null value when i want to create an > aro or aco ? i'am using database structure from the tutorial. no > modification i did at the structure. i just copy and paste form the > tutorial. So, the field that contain parent_id is allowed null value. > i read tutorial from IBM. > > i try this command : > php acl.php create aco 1 null "Tor Johnson School Of Drama" > and appear error that state parent_id can't be a null value > > but as i read in this bakery tutorial, i didn't see the tutorial > author passing null to object_id when defining ACO and passing null to > foreign_key when defining ARO. i got confused by IBM tutorial, why > they must pass null value ? > > thank you --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---