123456789101112131415161718192021222324252627282930 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2019/11/11 0011
- * Time: 17:01
- */
- class BGroupServer extends BusinessActiveRecord
- {
- public static function model($className = __CLASS__){
- return parent::model($className);
- }
- public function tableName(){
- return "group_server";
- }
- public function getDomainUrl($group_id)
- {
- $table_name = 'group_server';
- if (YII_ENV == 'testing'||YII_ENV == 'development'||YII_ENV=='local'){
- $table_name = $table_name.'_'.YII_ENV;
- }
- $sql = 'SELECT static_url FROM '.$table_name.' WHERE group_id='.$group_id;
- $static_url = $this->getDbConnection()->createCommand($sql)->queryScalar();
- return $static_url ? $static_url : '';
- }
- }
|