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

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

class Da_instructor extends Exhibition_Model
{

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

	public function insert_instructor($name)
	{
		$sql = "INSERT INTO {$this->db_name}.instructor 
		(
            name
        )
        VALUES (?);";
        $this->db->query($sql, [$name]);       
	}

	public function delete_instructor($id)
	{
		$sql = "UPDATE {$this->db_name}.instructor
        SET is_delete = ?
        WHERE instructor_id = ?";
        $this->db->query($sql, [1, $id]);
	}

	public function update_instructor($name, $id)
	{
		$sql = "UPDATE {$this->db_name}.instructor
        SET name = ?
        WHERE instructor_id = ?";
        $this->db->query($sql, [$name, $id]);
	}
}
