<?php

defined('BASEPATH') or exit('No direct script access allowed');

require_once 'Da_member.php';

class M_member extends Da_member
{
	public function __construct()
	{
		parent::__construct();
	}

	public function get_all(){
		$sql = "SELECT * FROM {$this->db_name}.member";
        $query = $this->db->query($sql);
        return $query;
	}

	public function get_member_by_project_id($id){
		$sql = "SELECT * FROM {$this->db_name}.member
		Where project_id = $id";
        $query = $this->db->query($sql);
        return $query;
	}

	public function get_member_frontend($id){
		$sql = "SELECT user.user_id, user.student_id, user.prefix, user.first_name, user.last_name, user.email, member.image FROM {$this->db_name}.member
		join user on member.user_id = user.user_id
		Where project_id = $id";
        $query = $this->db->query($sql);
        return $query;
	}
}
