private $teach_id=$_SESSION['teach_id'];
protected $_li
'Teaches'=> array(
'mapping_type'=>BELONGS_TO,
'class_name'=>'Teaches',
'foreign_key'=>'class_id',
'mapping_name'=>'teach_id',
'mapping_fields'=>'teach_id',
'as_fields'=>'teach_id',
'condition' => 'teach_id =$teach_id',
),
);
?>
我在condition条件里传个变量或者SESSION,怎么弄才好呢?上面失败了
最佳答案
