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

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

class Da_detail extends Exhibition_Model
{

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

	public function insert_detail($description, $image1, $image2, $template, $project_id)
	{
		$sql = "INSERT INTO {$this->db_name}.detail 
		(
            description,
			image1,
			image2,
			template,
			project_id
        )
        VALUES (?,?,?,?,?);";
        $this->db->query($sql, [$description, $image1, $image2, $template, $project_id]);  
	}

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