【发布时间】:2014-10-13 10:47:22
【问题描述】:
我是 cakephp 新手。
我有两个相互关联的表(student 和 payment_detail)。 学生有很多付款详情和 付款详情属于学生。
我有一个搜索视图:
<?php echo $this->Form->input('Student.roll_no', array('label' => __('Roll No'))); ?>
<?php echo $this->Form->end(__('View')); ?>
在控制器中查看方法:
public function view(){
if ($this->request->is('post')) {
$this->request->data;
return $this->redirect(array('action' => 'detailedview'));
}
}
当我单击查看按钮时,它会将我重定向到详细视图。所以我的问题是如何为控制器创建详细视图方法来检索与特定 roll_no 相关的记录中的所有字段。
【问题讨论】:
标签: cakephp cakephp-1.3 cakephp-2.3