You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
612 B
PHP
27 lines
612 B
PHP
<?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;
|
|
}
|
|
|
|
}
|