Yii Framework Forum: Activerecord yii2 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Activerecord yii2 Rate Topic: -----

#1 User is offline   Panix 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 08-December 14

Posted 16 August 2017 - 06:11 PM

подскажите пожалуйста как в yii2 реализовать такое??
    public function beforeFind() {
        $alias = $this->getTableAlias(true);
        $criteria = new CDbCriteria;
        $criteria->select = array(
            "*",
            new CDbExpression("CONCAT(X({$alias}.`coords`),',',Y({$alias}.`coords`)) AS coords"),
        );
        $this->dbCriteria->mergeWith($criteria);
    }

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users