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

class file_instruction_model extends App_Model
{
    function  get_instruction_by_taskid($id){
        $this->db->select('instruction,doc_type');
        $this->db->from(db_prefix() . 'file_instruction');
        $this->db->where('task_id', $id);
        $query = $this->db->get();
        
        if ($query->num_rows() > 0) {
            $task_instruction_data = $query->row();
            return ['instruction' => $task_instruction_data->instruction,'doc_type' => $task_instruction_data->doc_type];
        } else {
            return ['instruction' => '','doc_type' => ''];
        }
        
    }
}