我在MySQL中有两个表:
1)对象 -ID -name
2)object_info -ID -object_id -信息 -描述 型
其中每个对象在object_info上有20条记录:
如何实现表格输入???
on contoller
public function actionCreate() {
$object = new Object();
$object_info = new ObjectInfo();
if(isset($_POST['Ojbect'])) { //how to check POST?
}
$this->render('form', array('object'=>$object, 'object_info'=>$object_info);
}
关于如何构建表单? ?