Initial import from local backup (Documents-Playground/pakerpale)
This commit is contained in:
28
application/core/MY_Model.php
Normal file
28
application/core/MY_Model.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Jeonghwa Koo
|
||||
* Date: 2016-11-07
|
||||
* Time: 오후 9:54
|
||||
*/
|
||||
class MY_Model extends CI_Model
|
||||
{
|
||||
protected $db_session = [];
|
||||
protected $date;
|
||||
/**
|
||||
* MY_Model constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->date = date('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
protected function & getSession($config) {
|
||||
if(!isset($this->db_session[$config]))
|
||||
$this->db_session[$config] = $this->load->database($config, true) or die('Database Connection isn\'t established');
|
||||
return $this->db_session[$config];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user