• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CDbCriteria类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中CDbCriteria的典型用法代码示例。如果您正苦于以下问题:PHP CDbCriteria类的具体用法?PHP CDbCriteria怎么用?PHP CDbCriteria使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CDbCriteria类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: search

 /**
  * @return CActiveDataProvider
  */
 public function search()
 {
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id);
     $criteria->compare('name', $this->name, true);
     return new CActiveDataProvider($this, ['criteria' => $criteria]);
 }
开发者ID:yupe,项目名称:yupe,代码行数:10,代码来源:OrderStatus.php


示例2: search

 public function search()
 {
     $criteria = new CDbCriteria();
     $criteria->compare('id_tipo_riesgo', $this->id_tipo_riesgo);
     $criteria->compare('nombre', $this->nombre, true);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
开发者ID:VrainSystem,项目名称:Proyecto_PROFIT,代码行数:7,代码来源:BaseTipoRiesgo.php


示例3: displayDataset

 public function displayDataset($ids)
 {
     $criteria = new CDbCriteria();
     $criteria->addInCondition("id", $ids);
     $datasets = Dataset::model()->findAll($criteria);
     $this->generateFeed($datasets);
 }
开发者ID:jessesiu,项目名称:GigaDBV3,代码行数:7,代码来源:RssController.php


示例4: actionIndex

 /**
  * 生成首页
  *
  */
 public function actionIndex()
 {
     //print_r(Yii::app()->user->getState('username'));
     //先获取当前是否有页码信息
     $pages['pageNum'] = Yii::app()->getRequest()->getParam("pageNum", 1);
     //当前页
     $pages['countPage'] = Yii::app()->getRequest()->getParam("countPage", 0);
     //总共多少记录
     $pages['numPerPage'] = Yii::app()->getRequest()->getParam("numPerPage", 50);
     //每页多少条数据
     $pages['tmstart'] = Yii::app()->getRequest()->getParam("tmstart", date('Ym'));
     //开始月份
     $pages['tmstop'] = Yii::app()->getRequest()->getParam("tmstop", date('Ym'));
     //结束月份
     $pages['srh_service'] = Yii::app()->getRequest()->getParam("srh_service", "");
     //按餐厅名称查询
     $criteria = new CDbCriteria();
     !empty($pages['srh_service']) && $criteria->addCondition('type=' . $pages['srh_service']);
     $criteria->addCondition('`month`>=' . $pages['tmstart']);
     $criteria->addCondition('`month`<=' . $pages['tmstop']);
     $pages['countPage'] = AppBsMoney::model()->count($criteria);
     $criteria->limit = $pages['numPerPage'];
     $criteria->offset = $pages['numPerPage'] * ($pages['pageNum'] - 1);
     $allList = AppBsMoney::model()->findAll($criteria);
     $this->renderPartial('index', array('models' => $allList, 'pages' => $pages), false, true);
 }
开发者ID:a707937337,项目名称:bscy,代码行数:30,代码来源:AdminMoneyController.php


示例5: run

 public function run()
 {
     $params = array();
     $criteria = new CDbCriteria();
     //        $criteria->select = array('id,username,fullname,phone,address,status');
     $criteria->select = '*';
     if (isset($this->team_lear_id) and $this->team_lear_id != '') {
         $criteria->addCondition('team_lear_id=' . $this->team_lear_id);
     }
     $criteria->params = $params;
     $total = ATrainingTeam::model()->count($criteria);
     $offset = $this->limit * ($this->page - 1);
     $criteria->limit = $this->limit;
     $criteria->offset = $offset;
     $data = ATrainingTeam::model()->findAll($criteria);
     $listTrainee = array();
     if (!empty($data)) {
         foreach ($data as $item) {
             $listTrainee[] = CJSON::decode(CJSON::encode($item->pls_user));
         }
     }
     $data = $listTrainee;
     $pages = new CPagination($total);
     $pages->pageSize = $this->limit;
     $pages->applyLimit($criteria);
     $this->render($this->view, array('data' => $data, 'pages' => $pages));
 }
开发者ID:nguyendvphp,项目名称:onlinetraining,代码行数:27,代码来源:wg_dataUser_Team.php


示例6: search

 public function search()
 {
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id, true);
     $criteria->compare('html', $this->html, true);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
开发者ID:kostya1017,项目名称:our,代码行数:7,代码来源:BlocEditor.php


示例7: search

 /**
  * Retrieves a list of models based on the current search/filter conditions.
  *
  * Typical usecase:
  * - Initialize the model fields with values from filter form.
  * - Execute this method to get CActiveDataProvider instance which will filter
  * models according to data in model fields.
  * - Pass data provider to CGridView, CListView or any similar widget.
  *
  * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
  */
 public function search()
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id);
     $criteria->compare('title', $this->title, true);
     $criteria->compare('catalog_id', $this->catalog_id);
     $criteria->compare('soft_icon', $this->soft_icon, true);
     $criteria->compare('cover_image', $this->cover_image, true);
     $criteria->compare('soft_file', $this->soft_file, true);
     $criteria->compare('language', $this->language, true);
     $criteria->compare('softtype', $this->softtype, true);
     $criteria->compare('os', $this->os, true);
     $criteria->compare('softrank', $this->softrank, true);
     $criteria->compare('softsize', $this->softsize, true);
     $criteria->compare('softlink', $this->softlink, true);
     $criteria->compare('introduce', $this->introduce, true);
     $criteria->compare('content', $this->content, true);
     $criteria->compare('update_time', $this->update_time, true);
     $criteria->compare('create_time', $this->create_time, true);
     $criteria->compare('view_count', $this->view_count);
     $criteria->compare('down_count', $this->down_count);
     $criteria->compare('status', $this->status, true);
     $criteria->compare('tags', $this->tags, true);
     $criteria->compare('seo_title', $this->seo_title, true);
     $criteria->compare('seo_description', $this->seo_description, true);
     $criteria->compare('seo_keywords', $this->seo_keywords, true);
     return new CActiveDataProvider('Soft', array('criteria' => $criteria));
 }
开发者ID:jerrylsxu,项目名称:yiifcms,代码行数:41,代码来源:Soft.php


示例8: search

 /**
  * Retrieves a list of models based on the current search/filter conditions.
  * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
  */
 public function search()
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id);
     $criteria->compare('name', $this->name, true);
     $criteria->compare('name_en', $this->name_en, true);
     $criteria->compare('non_utf8_name', $this->non_utf8_name, true);
     $criteria->compare('parentid', $this->parentid);
     $criteria->compare('description', $this->description, true);
     $criteria->compare('description_en', $this->description_en, true);
     $criteria->compare('order', $this->order);
     $criteria->compare('active', $this->active);
     $criteria->compare('metadescription', $this->metadescription, true);
     $criteria->compare('metakeywords', $this->metakeywords, true);
     //$criteria->compare('delete',$this->delete);
     $criteria->addCondition("t.delete=0");
     $criteria->compare('createdby', $this->createdby);
     $criteria->compare('createdatetime', $this->createdatetime, true);
     $criteria->compare('lastmodifiedby', $this->lastmodifiedby);
     $criteria->compare('lastupdatedatetime', $this->lastupdatedatetime, true);
     //$criteria->order = 't.createdatetime DESC';
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
开发者ID:phantsang,项目名称:xzsUuJg0keDWW5Rx679PHBVBJ,代码行数:29,代码来源:ProductCategories.php


示例9: search_cabecera

 public function search_cabecera($id)
 {
     // @todo Please modify the following code to remove attributes that should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id);
     $criteria->compare('hidfactura', $this->hidfactura, true);
     $criteria->compare('item', $this->item, true);
     $criteria->compare('hidkardex', $this->hidkardex, true);
     $criteria->compare('iduser', $this->iduser);
     $criteria->compare('fechacrea', $this->fechacrea, true);
     $criteria->compare('hidalentrega', $this->hidalentrega, true);
     $criteria->compare('identrega', $this->identrega, true);
     $criteria->compare('iddetcompra', $this->iddetcompra, true);
     $criteria->compare('cant', $this->cant);
     $criteria->compare('fechaentrega', $this->fechaentrega, true);
     $criteria->compare('idkardex', $this->idkardex, true);
     $criteria->compare('punitentrega', $this->punitentrega);
     $criteria->compare('codart', $this->codart, true);
     $criteria->compare('cantcompras', $this->cantcompras);
     $criteria->compare('punitcompra', $this->punitcompra);
     $criteria->compare('itemcompra', $this->itemcompra, true);
     $criteria->compare('descri', $this->descri, true);
     $criteria->compare('codentro', $this->codentro, true);
     $criteria->addCondition("hidfactura=:identidad");
     $criteria->params = array(":identidad" => (int) $id);
     $criteria->order = "itemcompra ASC ";
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
开发者ID:hipogea,项目名称:zega,代码行数:28,代码来源:VwDetalleingresofactura.php


示例10: get_data

 private function get_data($filter = '', $limit = 5, $offset = 0)
 {
     $criteria = new CDbCriteria();
     if (is_array($filter)) {
         if (isset($filter['application_id'])) {
             $criteria->compare('application_id', $filter['application_id']);
         } else {
             $criteria->addCondition('application_id IS NULL');
         }
         if (isset($filter['project_id'])) {
             $criteria->compare('project_id', $filter['project_id']);
         }
     }
     $count = Notes::model()->count($criteria);
     $criteria->limit = $limit;
     $criteria->offset = $offset;
     $criteria->order = 'date_created DESC';
     $model = Notes::model()->findAll($criteria);
     $data = array();
     //XSS Purifier here
     // $p = new CHtmlPurifier();
     // $p->options = array('URI.AllowedSchemes'=>array(
     //     'http' => true,
     //     'https' => true,
     // ));
     foreach ($model as $row) {
         $data[] = array('note_id' => $row->note_id, 'project_id' => $row->project_id, 'application_id' => $row->application_id, 'notes' => str_replace('<', '&lt', $row->notes), 'date_created' => $row->date_created, 'date_updated' => $row->date_updated, 'created_by' => $row->created_by, 'updated_by' => $row->updated_by);
     }
     return array('data' => $data, 'data_count' => count($data), 'total_count' => $count);
 }
开发者ID:emircado,项目名称:pamgmt,代码行数:30,代码来源:NotesController.php


示例11: search

 /**
  * Retrieves a list of models based on the current search/filter conditions.
  *
  * Typical usecase:
  * - Initialize the model fields with values from filter form.
  * - Execute this method to get CActiveDataProvider instance which will filter
  * models according to data in model fields.
  * - Pass data provider to CGridView, CListView or any similar widget.
  *
  * @return CActiveDataProvider the data provider that can return the models
  * based on the search/filter conditions.
  */
 public function search()
 {
     // @todo Please modify the following code to remove attributes that should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('Id', $this->Id);
     $criteria->compare('Ext', $this->Ext, true);
     $criteria->compare('Line', $this->Line, true);
     $criteria->compare('Hreg', $this->Hreg, true);
     $criteria->compare('HN', $this->HN, true);
     $criteria->compare('SessNo', $this->SessNo, true);
     $criteria->compare('BegHd', $this->BegHd, true);
     $criteria->compare('HdMode', $this->HdMode, true);
     $criteria->compare('ClaimAcc', $this->ClaimAcc, true);
     $criteria->compare('Payers', $this->Payers, true);
     $criteria->compare('DlzNew', $this->DlzNew, true);
     $criteria->compare('EpoTn', $this->EpoTn, true);
     $criteria->compare('Epounit', $this->Epounit, true);
     $criteria->compare('Hct', $this->Hct, true);
     $criteria->compare('Paychk', $this->Paychk, true);
     $criteria->compare('Amount', $this->Amount, true);
     $criteria->compare('HDCharge', $this->HDCharge, true);
     $criteria->compare('Payrate', $this->Payrate, true);
     $criteria->compare('AddiPay', $this->AddiPay, true);
     $criteria->compare('Payable', $this->Payable, true);
     $criteria->compare('EHS', $this->EHS, true);
     $criteria->compare('BF', $this->BF, true);
     $criteria->compare('CheckCode', $this->CheckCode, true);
     $criteria->compare('Flag', $this->Flag, true);
     $criteria->compare('D_update', $this->D_update, true);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
开发者ID:kimniyom,项目名称:craimreport,代码行数:43,代码来源:HealthInsurance.php


示例12: search

 public function search()
 {
     $criteria = new CDbCriteria();
     $criteria->order = 'id DESC';
     $criteria->compare('apartment_id', $this->apartment_id, true);
     return new CActiveDataProvider($this, array('criteria' => $criteria, 'pagination' => array('pageSize' => param('adminPaginationPageSize', 20))));
 }
开发者ID:barricade86,项目名称:raui,代码行数:7,代码来源:Bookingcalendar.php


示例13: search

 /**
  * Retrieves a list of models based on the current search/filter conditions.
  *
  * Typical usecase:
  * - Initialize the model fields with values from filter form.
  * - Execute this method to get CActiveDataProvider instance which will filter
  * models according to data in model fields.
  * - Pass data provider to CGridView, CListView or any similar widget.
  *
  * @return CActiveDataProvider the data provider that can return the models
  * based on the search/filter conditions.
  */
 public function search()
 {
     // @todo Please modify the following code to remove attributes that should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('type', $this->type, true);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
开发者ID:alikh31,项目名称:FeedCloud,代码行数:19,代码来源:SwotType.php


示例14: search

 public function search()
 {
     $criteria = new CDbCriteria();
     $criteria->compare('LoginID', $this->LoginID);
     $criteria->compare('User', $this->User, true);
     $criteria->compare('Pass', $this->Pass, true);
     $criteria->compare('State', $this->State);
     $criteria->compare('Type', $this->Type);
     $criteria->compare('AreaID', $this->AreaID);
     $criteria->compare('Param', $this->Param);
     $criteria->compare('Comment', $this->Comment, true);
     $criteria->compare('TechComment', $this->TechComment, true);
     $criteria->compare('AddTime', $this->AddTime, true);
     $criteria->compare('LastTime', $this->LastTime, true);
     $criteria->compare('SendInt', $this->SendInt);
     $criteria->compare('Version', $this->Version, true);
     $criteria->compare('AppType', $this->AppType);
     $criteria->compare('AppVer', $this->AppVer, true);
     $criteria->compare('UpdTime', $this->UpdTime, true);
     $criteria->compare('AreaAdmin', $this->AreaAdmin);
     $criteria->compare('PersistCon', $this->PersistCon);
     $criteria->compare('LangID', $this->LangID);
     $criteria->compare('Email', $this->Email, true);
     $criteria->compare('MaxSessions', $this->MaxSessions);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
开发者ID:azzazello,项目名称:glonassCRM,代码行数:26,代码来源:BaseLogin.php


示例15: search2

 public function search2()
 {
     // @todo Please modify the following code to remove attributes that should not be searched.
     $criteria = new CDbCriteria();
     if (!empty($this->from_date) && empty($this->to_date)) {
         $criteria->condition = "TGL_PENGADAAN>='{$this->from_date}'";
         $criteria->compare('NAMA_TOKO', $this->NAMA_TOKO, true);
         $criteria->compare('STATUS', $this->STATUS, true);
     } else {
         if (empty($this->from_date) && !empty($this->to_date)) {
             $criteria->condition = "TGL_PENGADAAN<='{$this->to_date}'";
             $criteria->compare('NAMA_TOKO', $this->NAMA_TOKO, true);
             $criteria->compare('STATUS', $this->STATUS, true);
         } else {
             if (!empty($this->from_date) && !empty($this->to_date)) {
                 $criteria->condition = "TGL_PENGADAAN>='{$this->from_date}' and TGL_PENGADAAN<='{$this->to_date}'";
                 $criteria->compare('NAMA_TOKO', $this->NAMA_TOKO, true);
                 $criteria->compare('STATUS', $this->STATUS, true);
             } else {
                 $criteria->compare('NAMA_TOKO', $this->NAMA_TOKO, true);
                 $criteria->compare('STATUS', $this->STATUS, true);
             }
         }
     }
     return new CActiveDataProvider($this, array('criteria' => $criteria, 'sort' => array('defaultOrder' => 'TGL_PENGADAAN DESC'), 'pagination' => array('pageSize' => '10')));
 }
开发者ID:aunorafiq,项目名称:jks,代码行数:26,代码来源:Pengadaan.php


示例16: actionAutoComplete

 /**
  * Search the local authorities and return both their address and the address of their social security department
  *
  * @param $term
  */
 public function actionAutoComplete($term)
 {
     $crit = new \CDbCriteria();
     // NOTE: have commented out the address eager loading here due to column ambiguity issues with the relation definitions.
     // need to investigate if this can be solved with the cunning use of scopes on the Contact model or not.
     $crit->with = array('contact' => array('alias' => 'service_contact'), 'commissioning_body', 'commissioning_body.contact', 'type' => array('alias' => 'service_type'), 'commissioning_body.type' => array('alias' => 'body_type'));
     $crit->compare('LOWER(t.name)', strtolower($term), true);
     $crit->compare('LOWER(commissioning_body.name)', strtolower($term), true, 'OR');
     $crit->addColumnCondition(array('service_type.shortname' => 'SSD'));
     $crit->addColumnCondition(array('body_type.shortname' => 'LA'));
     $crit->order = 'commissioning_body.name, t.name';
     $results = array();
     $found_bodies = array();
     foreach (\CommissioningBodyService::model()->findAll($crit) as $cbs) {
         $body = $cbs->commissioning_body;
         $found_bodies[] = $body->id;
         $results[] = array('id' => 'service' . $cbs->id, 'value' => $cbs->name . " ({$body->name})", 'service' => array('id' => $cbs->id, 'name' => $cbs->name, 'address' => $cbs->getLetterAddress(array('delimiter' => ",\n")), 'telephone' => $cbs->contact->primary_phone), 'body' => array('id' => $body->id, 'name' => $body->name, 'address' => $body->getLetterAddress(array('delimiter' => ",\n")), 'telephone' => $body->contact->primary_phone));
     }
     $body_crit = new \CDbCriteria();
     $body_crit->with = array('type', 'contact', 'contact.correspondAddress');
     $body_crit->compare('LOWER(t.name)', strtolower($term), true);
     $body_crit->addNotInCondition('t.id', $found_bodies);
     $body_crit->addColumnCondition(array('type.shortname' => 'LA'));
     foreach (\CommissioningBody::model()->findAll($body_crit) as $body) {
         $results[] = array('id' => 'body' . $body->id, 'value' => $body->name, 'body' => array('id' => $body->id, 'name' => $body->name, 'address' => $body->getLetterAddress(array('delimiter' => ",\n")), 'telephone' => $body->contact->primary_phone));
     }
     echo json_encode($results);
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:33,代码来源:LocalAuthorityController.php


示例17: actionExportar

 public function actionExportar()
 {
     $clave = Configuraciones::model()->findByPk(1);
     if ($_POST['clave'] == $clave->super_usuario) {
         if ($_POST['filtro'] == 1) {
             $laFechaDesde = Yii::app()->dateformatter->format("yyyy-MM-dd", $_POST['fecha_desde']);
             $laFechaHasta = Yii::app()->dateformatter->format("yyyy-MM-dd", $_POST['fecha_hasta']);
             $attribs = array();
             $criteria = new CDbCriteria(array('order' => 'id DESC'));
             $criteria->addBetweenCondition('fecha_sola', $laFechaDesde, $laFechaHasta);
             $rows = MedicamentosBiologicos::model()->findAllByAttributes($attribs, $criteria);
         } else {
             $rows = MedicamentosBiologicos::model()->findAll();
         }
         // Export it
         $this->toExcel($rows, array('id::ID', 'medicamento'));
     } else {
         Yii::app()->user->setFlash('error', "Clave incorrecta para realizar la exportación.");
         $model = new MedicamentosBiologicos('search');
         $model->unsetAttributes();
         // clear any default values
         if (isset($_GET['MedicamentosBiologicos'])) {
             $model->attributes = $_GET['MedicamentosBiologicos'];
         }
         $this->render('admin', array('model' => $model));
     }
 }
开发者ID:josterricardo,项目名称:proyecto-cirugia,代码行数:27,代码来源:MedicamentosBiologicosController.php


示例18: actionGetimg

 public function actionGetimg()
 {
     if (isset($_POST['data'])) {
         $data = $_POST['data'];
         $model = new Image();
         $criteria = new CDbCriteria();
         if ($data[0]) {
             $criteria->addCondition("is_show=1 and pid={$data['0']} and id<{$data['1']}");
         } else {
             $criteria->addCondition("is_show=1 and id<{$data['1']}");
         }
         $criteria->order = 'id desc';
         $criteria->limit = 6;
         $imgs = $model->findAll($criteria);
         if (!$imgs) {
             echo 0;
             exit;
         }
         $html = array();
         if ($imgs) {
             foreach ($imgs as $one) {
                 $html[] = "<div class='item'><div class='animate-box bounceIn animated'>\r\n\t\t\t\t\t<a href='javascript:;' class='image-popup fh5co-board-img' title='{$one->title}'><img src='http://7xssk6.com2.z0.glb.clouddn.com/{$one->img}' alt='s-nice'></a>\t\t\t\t\t\t\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class='fh5co-desc'>{$one->des}</div></div>";
             }
             $html[] = "<p style='display:none' id='imgid'>{$one->id}</p>";
         }
         $html = json_encode($html);
         if ($html) {
             echo $html;
             exit;
         } else {
             echo 0;
             exit;
         }
     }
 }
开发者ID:s-nice,项目名称:snece,代码行数:35,代码来源:CommonController.php


示例19: actionUserFind

 /**
  * Duplicated from the admin controller to give a user list.
  *
  * @TODO: There's a method on the UserController that could be used, so would be worth consolidating)
  */
 public function actionUserFind()
 {
     $res = array();
     if (\Yii::app()->request->isAjaxRequest && !empty($_REQUEST['search'])) {
         $criteria = new \CDbCriteria();
         $criteria->compare('LOWER(username)', strtolower($_REQUEST['search']), true, 'OR');
         $criteria->compare('LOWER(first_name)', strtolower($_REQUEST['search']), true, 'OR');
         $criteria->compare('LOWER(last_name)', strtolower($_REQUEST['search']), true, 'OR');
         $words = explode(' ', $_REQUEST['search']);
         if (count($words) > 1) {
             // possibly slightly verbose approach to checking first and last name combinations
             // for searches
             $first_criteria = new \CDbCriteria();
             $first_criteria->compare('LOWER(first_name)', strtolower($words[0]), true);
             $first_criteria->compare('LOWER(last_name)', strtolower(implode(' ', array_slice($words, 1, count($words) - 1))), true);
             $last_criteria = new \CDbCriteria();
             $last_criteria->compare('LOWER(first_name)', strtolower($words[count($words) - 1]), true);
             $last_criteria->compare('LOWER(last_name)', strtolower(implode(' ', array_slice($words, 0, count($words) - 2))), true);
             $first_criteria->mergeWith($last_criteria, 'OR');
             $criteria->mergeWith($first_criteria, 'OR');
         }
         foreach (\User::model()->findAll($criteria) as $user) {
             $res[] = array('id' => $user->id, 'label' => $user->getFullNameAndTitle(), 'value' => $user->getFullName(), 'username' => $user->username);
         }
     }
     echo \CJSON::encode($res);
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:32,代码来源:DefaultController.php


示例20: search

 /**
  * Retrieves a list of models based on the current search/filter conditions.
  * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
  */
 public function search()
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('Id', $this->Id);
     $criteria->compare('ProjectType', $this->ProjectType, true);
     $criteria->compare('Firstname', $this->Firstname, true);
     $criteria->compare('Lastname', $this->Lastname, true);
     $criteria->compare('Phone', $this->Phone, true);
     $criteria->compare('AlternatePhone', $this->AlternatePhone, true);
     $criteria->compare('Email', $this->Email, true);
     $criteria->compare('StreetAddress', $this->StreetAddress, true);
     $criteria->compare('City', $this->City, true);
     $criteria->compare('State', $this->State, true);
     $criteria->compare('Zip', $this->Zip, true);
     $criteria->compare('SquareFoot', $this->SquareFoot, true);
     $criteria->compare('Budget', $this->Budget, true);
     $criteria->compare('ProjectDetails', $this->ProjectDetails, true);
     $criteria->compare('ProjectReason', $this->ProjectReason, true);
     $criteria->compare('Start', $this->Start, true);
     $criteria->compare('Age', $this->Age, true);
     $criteria->compare('IsOwn', $this->IsOwn);
     $criteria->compare('TimeToContact', $this->TimeToContact, true);
     $criteria->compare('IsFinancing', $this->IsFinancing);
     $criteria->compare('IpAddress', $this->IpAddress, true);
     $criteria->compare('IsFreePage', $this->IsFreePage);
     $criteria->compare('Affiliate', $this->Affiliate, true);
     $criteria->compare('MyPageAffiliate', $this->MyPageAffiliate, true);
     $criteria->compare('IsSentToRenovExperts', $this->IsSentToRenovExperts);
     $criteria->compare('Created', $this->Created, true);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
开发者ID:seph-al,项目名称:handyman,代码行数:37,代码来源:Contractorleads.php



注:本文中的CDbCriteria类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CDbTestCase类代码示例发布时间:2022-05-23
下一篇:
PHP CDbConnection类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap