✏️ 正在编辑: CorretorEmail.php
路径:
/srv/systems_dir/yuppiecred/application/models/DbTable/CorretorEmail.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Model_DbTable_CorretorEmail extends Core_DbTable { protected $_primary = 'id'; protected $_name = 'tb_corretores_emails'; protected $_referenceMap = array( 'Corretor' => array( 'columns' => array( 'corretor_id' ), 'refTableClass' => 'Model_DbTable_Corretor', 'refColumns' => array( 'id' ) ) ); public function insert(array $data) { $exist = $this->fetchRow("email_adicional = '{$data['email_adicional']}'"); $dbtableCorretor = new Model_DbTable_Corretor(); $existEmailCorretor = $dbtableCorretor->fetchRow("email = '{$data['email_adicional']}'"); if( $exist || $existEmailCorretor ){ throw new Exception("Atenção! Email cadastrado já existe."); } return parent::insert($data); } }
💾 保存文件
← 返回文件管理器