예제 #1
0
 public function Edit($dbMgr, $smartyMgr, $id)
 {
     parent::Edit($dbMgr, $smartyMgr, $id);
     global $SysUser;
     $doctor_id = $SysUser["id"];
     $sql = "select * from tb_notice_doctor where notice_id={$id} and doctor_id={$doctor_id} ";
     $query = $dbMgr->query($sql);
     $result = $dbMgr->fetch_array_all($query);
     if (count($result) == 0) {
         $sql = "insert into tb_notice_doctor (doctor_id,notice_id,haveread) values ({$doctor_id},{$id},'Y') ";
         $query = $dbMgr->query($sql);
     }
 }