Model:relation您所请求的方法不存在!

浏览:506 发布日期:2014/09/12 分类:求助交流
class GameRelationModel extends RelationModel {
protected $tableName = 'game';
protected $fields = array('gameid', 'developerid', 'title', 'gametype', 'thumb','gamekeyword', 'gamenote', 'homepage','targetage','targetsex','background','textcolore','refresh','effect','rule','price','feekind','unitprice','freeflg','urlid','managekey','status','create_time');
protected $pk = 'gameid';

public $_auto = array(
array('create_time','time',self::MODEL_INSERT,'function'),
);

protected $_link = array(
'Urlmanage' => array(
'mapping_type' => self::HAS_ONE,
'class_name' => 'Urlmanage',
'foreign_key' => 'urlid',

),
);
}

$Game = D("Game"); // 实例化User对象
// 查找status值为1name值为think的用户数据
$data = $Game->relation(true)->where('gameid=4')->select();
最佳答案
评论() 相关
后面还有条评论,点击查看>>