<?php

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

require_once 'Da_project_tag.php';

class M_project_tag extends Da_project_tag
{
	public function __construct()
	{
		parent::__construct();
	}

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

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

	public function get_by_id($id){
		$sql = "SELECT * FROM {$this->db_name}.project_tag
		join tag on project_tag.tag_id = tag.tag_id
		Where project_id = $id";
        $query = $this->db->query($sql);
        return $query;
	}
}
