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

require_once dirname(__FILE__) . '/../Exhibition_Model.php';

class Da_member extends Exhibition_Model
{

	public function __construct()
	{
		parent::__construct();
	}

	public function insert_member($image, $user_id, $project_id){
		$sql = "INSERT INTO {$this->db_name}.member 
		(
            image,
			project_id,
			user_id
        )
        VALUES (?,?,?);";
        $this->db->query($sql, [$image, $project_id, $user_id]);       
	}

	public function delete_member_by_id($id)
	{
		$sql = "DELETE FROM {$this->db_name}.member
        WHERE project_id = ?";
        $this->db->query($sql, [$id]);
	}
}
