For reverse routing in paginator
I hate the paginator in cakephp 2.3.5. (I have used the search plugin strictly.) Currently, the url link html- prev () is generated when you send in the page view side x.ne.jp / Fronts / search / state_id: xx / city_id: yy If, after being routed reversed x.ne.jp / pc / search / page: 2 It becomes. Router setting Router::connect('/pc/search/*', array('controller'='Fronts', 'action' = 'search', 'area_id'= 28))); view code. $this-Paginator-options(array('url'=array('controller'='Fronts', 'action'='search', 'area_id'=28)); I would like to take over the named parameters even when you reverse routing. Best regards. -- 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. For more options, visit https://groups.google.com/groups/opt_out.
Use of intermediate model of HABTM
I am using cakephp 2.3.5. There are B and model A model is a relationship HABTM, C model and intermediate model AB is the relationship of hasOne. A.php class A extends AppModel { public $recursive = 2; public $hasAndBelongsToMany = array( 'B' = array( 'with' = 'C', ) ); } AB.php class AB extends AppModel { public $hasOne = array( 'C' ); } AsController.php $ this- A- find ('all'); If it is carried out, you pick up the results of up to AB, but it does not pick up the results of the association of C and AB. In the confirmation, $ this- AB- find ('all'); So I pick up the results. Is it not possible like this? Please tips. 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 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. For more options, visit https://groups.google.com/groups/opt_out.
Re: about Notice (8): Undefined index:
Hi, You can measure it by a new PDO driver. 2013年4月26日金曜日 18時45分40秒 UTC+9 Khánh Vương: Hi, I have same error. Please let me know way to solve this problem. Thanks! On Tuesday, April 2, 2013 11:26:14 PM UTC+7, wen ger0606 wrote: I'm using 2.3.1 cakephp. When you run the following simple code, Notice (8): Undefined index: User [APP / View / Users / index.ctp, line 6] occurs. If you run in cakephp 2.3.1 on another server the same code, the error does not occur. - UsersController.php --- class UsersController extends AppController { public $ uses = array ('User'); public $ layout = 'default'; public function index () { $ userData = $ this- User- find ('all'); $ this- set ('userData', $ userData); } } - User.php --- class User extends AppModel { public $ name = 'User'; } - Index.ctp --- table php foreach ($ userData as $ data):?? tr td ? php echo $ data ['User'] ['name'];? / td / tr php endforeach;?? / table - Debug ($ userData) --- $ userData = array ( (int) 0 = array ( (int) 0 = array ( 'id' = '1 ', 'name' = 'suzuki' ) ) ) Set so the server, I think that there is such a phenomenon occur? If there is a point that I noticed something, please advice. *best regards* -- 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. For more options, visit https://groups.google.com/groups/opt_out.
Re: about Notice (8): Undefined index:
Hi Jerome Place who have pointed out, it was my mistake of copy and paste. By the way, earlier, was found to cause. Was v5.0.33 version of PDO Driver for MySQL on the server I'm using. For this purpose, lib \ Cake \ Model \ Datasource \ Database \ Mysql.php was due getColumnMeta function that will be used in the resultSet function can not get the table name. Thank you to answer me. 2013年4月3日水曜日 16時28分03秒 UTC+9 Jerome Walitzek: hi there, i think your index.ctp file not correct. you write table php foreach ($ userData as $ data):?? tr td ? php echo $ data ['User'] ['name'];? / td / tr php endforeach;?? / table please write ?php . ? and not php ?? try this one table ?php foreach ($userData as $data): ? tr td?php echo $data['User']['name'];? / td / tr ?php endforeach; ? / table i hope it helps you Am Dienstag, 2. April 2013 18:26:14 UTC+2 schrieb wen ger0606: I'm using 2.3.1 cakephp. When you run the following simple code, Notice (8): Undefined index: User [APP / View / Users / index.ctp, line 6] occurs. If you run in cakephp 2.3.1 on another server the same code, the error does not occur. - UsersController.php --- class UsersController extends AppController { public $ uses = array ('User'); public $ layout = 'default'; public function index () { $ userData = $ this- User- find ('all'); $ this- set ('userData', $ userData); } } - User.php --- class User extends AppModel { public $ name = 'User'; } - Index.ctp --- table php foreach ($ userData as $ data):?? tr td ? php echo $ data ['User'] ['name'];? / td / tr php endforeach;?? / table - Debug ($ userData) --- $ userData = array ( (int) 0 = array ( (int) 0 = array ( 'id' = '1 ', 'name' = 'suzuki' ) ) ) Set so the server, I think that there is such a phenomenon occur? If there is a point that I noticed something, please advice. *best regards* -- 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. For more options, visit https://groups.google.com/groups/opt_out.
about Notice (8): Undefined index:
I'm using 2.3.1 cakephp. When you run the following simple code, Notice (8): Undefined index: User [APP / View / Users / index.ctp, line 6] occurs. If you run in cakephp 2.3.1 on another server the same code, the error does not occur. - UsersController.php --- class UsersController extends AppController { public $ uses = array ('User'); public $ layout = 'default'; public function index () { $ userData = $ this- User- find ('all'); $ this- set ('userData', $ userData); } } - User.php --- class User extends AppModel { public $ name = 'User'; } - Index.ctp --- table php foreach ($ userData as $ data):?? tr td ? php echo $ data ['User'] ['name'];? / td / tr php endforeach;?? / table - Debug ($ userData) --- $ userData = array ( (int) 0 = array ( (int) 0 = array ( 'id' = '1 ', 'name' = 'suzuki' ) ) ) Set so the server, I think that there is such a phenomenon occur? If there is a point that I noticed something, please advice. *best regards* -- 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. For more options, visit https://groups.google.com/groups/opt_out.
Re: Smarty Debug Console with CakePHP
Hi Anas Mughal I use the environment and cakephp2 smarty3.1.12. I have modified by referring to your blog, / / $ _template- assign ('assigned_vars', $ _assigned_vars); When implemented, the symptoms that nothing is displayed on the console occurs. I think because you do not want to assign to debug.tpl a $ _assigned_vars, the reasons for this. On the contrary, when it revived, stop error display occurs when you pass a '$ this' in debug_print_var.php. 2011年5月3日火曜日 16時09分22秒 UTC+9 anasmughal: In case someone is planning or is already using Smarty with CakePHP, I just finished writing a post on how to enable Smarty Debug Console with CakePHP. http://blog.anas-mughal.com/?p=28 Hope it is useful... I welcome comments and feedback. -- Anas Mughal http://anas-mughal.com -- 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. For more options, visit https://groups.google.com/groups/opt_out.