这是查出来的页面array(1) {
[0] => array(4) {
["id"] => string(1) "1"
["username"] => string(1) "a"
["password"] => string(1) "a"
["good"] => bool(false)
}
}这是model代码<?phpclass UserModel extends RelationModel{ public $_link=array( 'good'=>array( 'mapping_type' =>HAS_ONE, 'class_name' =>'good', 'mapping_name'=>'good', 'foeign_key'=>'uid', 'mapping_fileds'=>'title', ), );}?>这是action代码<?php// 本类由系统自动生成,仅供测试用途class IndexAction extends Action { public function index(){ $user=new UserModel(); $list=$user->relation(true)->select(); dump($list); }}
目前暂无任何回答
- 0 回答
- 1 关注
- 2159 浏览
添加回答
举报
0/150
提交
取消