<?php

class fastapi_model extends CI_Model
{


    function __construct()
    {
        parent::__construct();
        $this->HT = $this->load->database('TOURMANAGER_READ', TRUE);
        $this->INFO = $this->load->database('INFORMATION_READ', TRUE);
    }

    public function get_query($database, $sql)
    {
        if ($database === 'TOURMANAGER') {
            $query = $this->HT->query($sql);
            return $query->result();
        } else if ($database === 'INFOMANAGER') {
            $query = $this->INFO->query($sql);
            return $query->result();
        }
        return false;
    }

}
