✏️ 正在编辑: EsteiraContrato.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/models/DbTable/EsteiraContrato.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Model_DbTable_EsteiraContrato extends Core_DbTable { protected $_primary = 'id'; protected $_name = 'tb_esteira_contratos'; public function fetchAll($where = null, $order = null, $count = null,$offset = null) { if( ($where instanceof Zend_Db_Table_Select ) ){ $strWhere = "{$this->_name}.excluido<>1"; foreach ( $where->getPart(Zend_Db_Table_Select::WHERE) as $w ) { $strWhere .= ' AND ' . $w; } $where->where($strWhere); } elseif( is_array($where) ){ $where[] = "{$this->_name}.excluido<>1"; } elseif( $where != null ){ $where .= " AND {$this->_name}.excluido<>1"; } else { $where = "{$this->_name}.excluido<>1"; } $select = $this->getAdapter()->select()->from(array( 'tb_esteira_contratos' ), array( '*' )) ->joinLeft(array( 'corretores' => 'tb_corretores' ), 'tb_esteira_contratos.cpf_corretor = corretores.cpf', array( 'corretor' => 'nome')) ->where($where); if( $order != null ){ $select->order($order); } return $this->getAdapter()->fetchAll($select); } }
💾 保存文件
← 返回文件管理器