☆一蚊一打龟
- ☆一蚊一打龟 2019-07-29 已签到连续签到1天,获得了5个金钱
- ☆一蚊一打龟 2019-07-23 已签到连续签到1天,获得了5个金钱
- ☆一蚊一打龟 2019-07-20 已签到连续签到1天,获得了5个金钱
- ☆一蚊一打龟 2019-07-18 已签到连续签到1天,获得了5个金钱
- ☆一蚊一打龟 2019-07-13 已签到连续签到2天,获得了10个金钱
- ☆一蚊一打龟 回复了 不求而得的往往求而不得 的回答
$query->andwhere(new Expression("FIND_IN_SET(:supplier, supplier)",[":supplier"=>$this->supplier]));
FIND_IN_SET查询,或者根据实际情况存一张关系表,把文章和类型存为一对一。不知道是不是你问的意思。这个我知道,但是数据表不能改了。我就想知道relations方法中应该怎么写和调用
public function relations(){ // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( 'cate'=>array(self::BELONGS_TO, 'NewsCate', 'cate_id') ); }
这种写法只会返回一个