✏️ 正在编辑: CorretorCredito.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/models/DbTable/CorretorCredito.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Model_DbTable_CorretorCredito extends Core_DbTable { protected $_primary = 'id'; protected $_name = 'tb_corretores_creditos'; public function insert(array $data) { $data['data_credito'] = date('Y-m-d'); $data['usuario'] = Yuppie_Auth::getIdentity()->login; parent::insert($data); } public function somaPorCorretor($idCorretor) { $select = $this->select(); $select->from('tb_corretores_creditos', 'SUM(credito)') ->where('excluido<>1 AND corretor_id = ?', $idCorretor); return $this->getAdapter()->fetchOne($select); } }
💾 保存文件
← 返回文件管理器