当前位置: 首页>>代码示例>>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;未经允许,请勿转载。