Exemplo n.º 1
0
 public function system_get_detail_message_messsage_id($message_id)
 {
     try {
         $sql = " SELECT * FROM message \n                    WHERE\n                     id = :message_id \n                     limit 1 ";
         $stmh = $this->pdo->prepare($sql);
         $stmh->bindValue(':message_id', $message_id, PDO::PARAM_INT);
         $stmh->execute();
         $i = 0;
         $data = array();
         $MemberModel = new MemberModel();
         $CustomerModel = new CustomerModel();
         $ActionModel = new ActionModel();
         $data = $stmh->fetch(PDO::FETCH_ASSOC);
         $action_data = $ActionModel->get_action_id($data['action_id']);
         $customer_data = $CustomerModel->get_customer_authinfo_id($data['company_id']);
         $member_data = $MemberModel->get_member_base_info_id($data['member_id']);
         $project_data = $CustomerModel->get_project_title($data['project_id']);
         $data['action_reg_date'] = $action_data['reg_date'];
         $data['company_name'] = $customer_data['company_name'];
         $data['member_name'] = $member_data['last_name'] . ' ' . $member_data['first_name'];
         $data['title'] = $project_data;
         $data['body'] = htmlspecialchars($data['body'], ENT_QUOTES);
         $data['body'] = nl2br($data['body']);
         $i++;
     } catch (PDOException $Exception) {
         print "エラー" . $Exception->getMessage();
     }
     return $data;
 }