2013年10月6日

ThinkPHP第十一天(关联模型使用,独立分组配置,MySQL concat用法)

摘要: 1、关联模型的使用 定义方式:新建一个类文件UserRelationModel.class.phpClass UserRelationModel extends RelationModel{ protected $tableName = 'user';//主表名称 protected $_link = array( 'article'=>array(//从表名称 'mapping_type'=>HAS_MANY,//主表对于从表的关系 主表可以有很多从表内容 'foreign_key'=>'uid' 阅读全文

posted @ 2013-10-06 20:43 huilange 阅读(501) 评论(0) 推荐(0) 编辑

导航