當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CDbCriteria::addcondition方法代碼示例

本文整理匯總了PHP中CDbCriteria::addcondition方法的典型用法代碼示例。如果您正苦於以下問題:PHP CDbCriteria::addcondition方法的具體用法?PHP CDbCriteria::addcondition怎麽用?PHP CDbCriteria::addcondition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CDbCriteria的用法示例。


在下文中一共展示了CDbCriteria::addcondition方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: devuelveinventario

 public function devuelveinventario($centro, $almacen, $codigo)
 {
     $criteria = new CDbCriteria();
     $criteria->addcondition("codcen=:vcodcen", 'AND');
     $criteria->addcondition("codalm=:vcodalm", 'AND');
     $criteria->addcondition("codart=:vcodart");
     $criteria->params = array(":vcodcen" => trim($centro), ":vcodalm" => trim($almacen), ":vcodart" => trim($codigo));
     $registro = Alinventario::model()->find($criteria);
     return !is_null($registro) ? $registro : 0;
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:10,代碼來源:SolpeController.php

示例2: 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($idobjeto, $iduser)
 {
     $idobjeto = (int) $idobjeto;
     $iduser = (int) $iduser;
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id, true);
     $criteria->compare('hidobjeto', $this->hidobjeto);
     $criteria->compare('valor1', $this->valor1, true);
     $criteria->compare('valor2', $this->valor2, true);
     $criteria->compare('signo', $this->signo);
     $criteria->addcondition('iduser=' . $iduser);
     $criteria->addcondition('hidobjeto=' . $idobjeto);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:26,代碼來源:Authobjetosrango.php

示例3: search_docu

 public function search_docu($documento, $identidad)
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id);
     $criteria->compare('usuario', $this->usuario, true);
     $criteria->compare('cuando', $this->cuando, true);
     $criteria->compare('codocu', $this->codocu, true);
     $criteria->compare('enviadoel', $this->enviadoel, true);
     $criteria->compare('nombrefichero', $this->nombrefichero, true);
     $criteria->addcondition("codocu='" . $documento . "'");
     $criteria->addcondition(" hidocu=" . $identidad . "");
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:15,代碼來源:Mensajes.php

示例4: 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('codart',$this->codart,true);
     $criteria->compare('desum', $this->desum, true);
     $criteria->compare('punit', $this->punit);
     $criteria->compare('descripcion', $this->descripcion, true);
     $criteria->compare('ptlibre', $this->ptlibre);
     $criteria->compare('ranking', $this->ranking);
     $criteria->compare('clase', $this->clase, true);
     $criteria->compare('acumulado', $this->acumulado);
     $criteria->compare('porcentaje', $this->porcentaje);
     $criteria->compare('hinventario', $this->hinventario, true);
     $criteria->compare('idsesion', $this->idsesion);
     $criteria->compare('column_7', $this->column_7);
     $criteria->compare('porcentajeac', $this->porcentajeac);
     $criteria->addcondition('idsesion=' . Yii::app()->user->getId() . '');
     if (isset($_SESSION['sesion_Maestrocompo'])) {
         $criteria->addInCondition('codart', $_SESSION['sesion_Maestrocompo'], 'AND');
     } else {
         $criteria->compare('codart', $this->codart, true);
     }
     $criteria->order = "ranking";
     return new CActiveDataProvider($this, array('criteria' => $criteria, 'pagination' => array('pageSize' => 1000)));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:38,代碼來源:VwPareto.php

示例5: search_por_almacen

 public function search_por_almacen($codal, $codcen)
 {
     $criteria = new CDbCriteria();
     $criteria->compare('destipo', $this->destipo, true);
     $criteria->compare('codtipo', $this->codtipo, true);
     $criteria->compare('codcen', $this->codcen, true);
     $criteria->compare('codalm', $this->codalm, true);
     $criteria->compare('codsoc', $this->codsoc, true);
     $criteria->compare('nomal', $this->nomal, true);
     $criteria->compare('stocklibre', $this->stocklibre);
     $criteria->compare('stockreservado', $this->stockreservado);
     $criteria->compare('stocktransito', $this->stocktransito);
     $criteria->addcondition("codcen='" . $codcen . "'");
     $criteria->addcondition("codalm='" . $codal . "'");
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:16,代碼來源:VwStockPorTipos.php

示例6: search_por_carga

 public function search_por_carga($id)
 {
     // @todo Please modify the following code to remove attributes that should not be searched.
     $criteria = new CDbCriteria();
     $criteria->addcondition("hidcarga=:vid");
     $criteria->params = array(":vid" => $id);
     return new CActiveDataProvider($this, array('criteria' => $criteria, 'pagination' => array('pageSize' => 60)));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:8,代碼來源:Cargamasivadet.php

示例7: search_window

 public function search_window()
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('codserv', $this->codserv, true);
     $criteria->addcondition(" descripcion like '%" . $this->descripcion . "%' ");
     return new CActiveDataProvider($this, array('criteria' => $criteria, 'pagination' => array('pageSize' => 100)));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:9,代碼來源:Maestroservicios.php

示例8: search_por_id

 public function search_por_id($id)
 {
     // @todo Please modify the following code to remove attributes that should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('iddocu', $this->iddocu, true);
     $criteria->compare('codocu', $this->codocu);
     $criteria->compare('codimpuesto', $this->codimpuesto, true);
     $criteria->addcondition("iddocu=" . (int) $id);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:10,代碼來源:Impuestosdocuaplicado.php

示例9: search_por_lista

 public function search_por_lista($hid)
 {
     // @todo Please modify the following code to remove attributes that should not be searched.
     $hid = (int) $hid;
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id, true);
     $criteria->compare('hidlista', $this->hidlista, true);
     $criteria->compare('codigo', $this->codigo, true);
     $criteria->addcondition(" hidlista=" . $hid);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:11,代碼來源:Dlistamaeriales.php

示例10: search_por_temporada

 public function search_por_temporada($idtemporada)
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('nomespecie', $this->nomespecie, true);
     $criteria->compare('idespecie', $this->idespecie);
     $criteria->compare('idtemporada', $this->idtemporada);
     $criteria->compare('sum', $this->sum, true);
     $criteria->addcondition("idtemporada=" . $idtemporada);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:12,代碼來源:VwReportepescaEspeciesTemporada.php

示例11: search_por_contacto

 public function search_por_contacto($id)
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id);
     $criteria->compare('mail', $this->mail, true);
     $criteria->compare('activo', $this->activo);
     $criteria->compare('codocu', $this->codocu, true);
     $criteria->addcondition('hidcontacto=' . $id);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:12,代碼來源:Contactosadicio.php

示例12: search_por_peticion

 /**
  * 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_por_peticion($id)
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('punit', $this->punit);
     $criteria->compare('plista', $this->plista);
     $criteria->compare('igv_monto', $this->igv_monto);
     $criteria->compare('pventa', $this->pventa);
     $criteria->compare('descuento', $this->descuento);
     $criteria->addcondition('hidpeticion=' . $id);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:17,代碼來源:VwSubtotalpeticion.php

示例13: 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($id)
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('nigv', $this->nigv);
     $criteria->compare('descuento', $this->descuento);
     $criteria->compare('subtotaldes', $this->descuento);
     $criteria->compare('subtotal', $this->subtotal);
     $criteria->compare('destotal', $this->destotal);
     $criteria->compare('impuesto', $this->impuesto);
     $criteria->addcondition('hidguia=' . $id);
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:18,代碼來源:VwCotisubtotal.php

示例14: search_ide

 public function search_ide($id)
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id);
     $criteria->compare('iddetcompra', $this->iddetcompra, true);
     $criteria->compare('cant', $this->cant);
     $criteria->compare('fecha', $this->fecha, true);
     $criteria->compare('idkardex', $this->idkardex, true);
     $criteria->compare('usuario', $this->usuario, true);
     $criteria->addcondition("iddetcompra=" . $id . "");
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:14,代碼來源:Alentregas.php

示例15: search_por_docu

 public function search_por_docu($docu)
 {
     // Warning: Please modify the following code to remove attributes that
     // should not be searched.
     $criteria = new CDbCriteria();
     $criteria->compare('id', $this->id);
     $criteria->compare('codocu', $this->codocu, true);
     $criteria->compare('campo', $this->campo, true);
     $criteria->compare('nombrecampo', $this->nombrecampo, true);
     $criteria->compare('tipodato', $this->tipodato, true);
     $criteria->compare('longitud', $this->longitud);
     $criteria->compare('nombredelmodelo', $this->nombredelmodelo, true);
     $criteria->compare('primercampolista', $this->primercampolista, true);
     $criteria->compare('segundocampolista', $this->segundocampolista, true);
     $criteria->compare('seleccionable', $this->seleccionable, true);
     $criteria->addcondition("codocu='" . $docu . "'");
     return new CActiveDataProvider($this, array('criteria' => $criteria));
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:18,代碼來源:Opcionescamposdocu.php


注:本文中的CDbCriteria::addcondition方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。