How to paginate in HasAndBelongsToMany?(a liitle bit confused )
I do have a articles model and tags model. articles HABTM tags i use $this-set('articles', $this-Article-paginate()); and i can use paginator in index.ctp of Articles. I try to search articles by Tags, but the problem is it doesn't fit with the paginator. here's the code for showing of articles $articles = $this-paginate('Article', $condition); and here's when i try to search by tag name $condition = array('Tag.slug' = $this-passedArgs['tag']); $articles = $this-paginate('Article.Tag', $condition); But the come with different structure. How can i solve this one? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Why do cake bake seems not to access my app folder?
Why do cake bake seems not to access my app folder? instead it shows the following and ask me the directory where i wanted to put my app Welcome to CakePHP v2.0.2 Console --- App : emr2.0 Path: /richardfiles/projects/php/xampproot/emr2.0/ --- What is the path to the project you want to bake? [/richardfiles/projects/php/xampproot/emr2.0/myapp] I do have an app folder at emr2.0 and actually i do have some i use bake previously and after i edit some of the views i decided to add again a model by using bake, but now bake seems to not work. thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Multiply foreign keys in one table.
Ah. sorry, i didn't post my question. I would like to ask on how would i implement HABTM relationship in the four tables? Looking like Staffs School #1 - Science Teacher 1 School #1 - Science Teacger 2 School #2 - Physic Professor Thanks On Oct 27, 1:53 pm, Richard Neil Roque roquerichardn...@gmail.com wrote: My program is consist of tables: staff schools positions positions_schools_staffs 1 staff can be in in different school 1 staff can have different position in every school. I do it using HABTM to hospital, So one staff can have many hospital But i dont know how to retrieve the positions. positions_schools_staffs structure: id int staff_id int school_id int position_id int created date modified date Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Multiply foreign keys in one table.
My program is consist of tables: staff schools positions positions_schools_staffs 1 staff can be in in different school 1 staff can have different position in every school. I do it using HABTM to hospital, So one staff can have many hospital But i dont know how to retrieve the positions. positions_schools_staffs structure: id int staff_id int school_id int position_idint createddate modified date Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Is there any way to mimic cakephp password hasing using java?
I do create a cakephp application using mysql server. And now i'm trying to create a java application. Now what im having trouble is in adding a new user using java Many thanks!! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Is there any way to mimic cakephp password hasing using java?
Thanks, i already got how to do it, i search for the code of security and figure that it uses sha1 for hashing(default), many thanks again :D -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: How can i update a field using a function
Thanks for your reply. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
How can i update a field using a function
Hi i'm a new developer using CakePHP. I would like to know How can i update a field using a function. Example is UPDATE Users SET AGE=AGE+2+3+4 WHERE id=1??? Currently i do have a code like this one. $this-User-id = $user['User']['id']; $this-User-saveField('count_login', 'count_login+1'); $this-User-saveField('last_login', date('Y-m-d H:i:s')); Thanks. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php