Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // MINHA MY MODEL -------------
- <?php
- class MY_Model extends CI_Model
- {
- protected $db2;
- public function __construct() {
- parent::__construct();
- $this->connect();
- }
- public function __destruct() {
- $this->db->close();
- }
- public function connect(){
- $second = array(
- 'dsn' => '',
- 'hostname' => 'localhost',
- 'username' => 'root',
- 'password' => '',
- 'database' => 'nomebanco',
- 'dbdriver' => 'mysqli',
- 'dbprefix' => '',
- 'pconnect' => FALSE,
- 'db_debug' => (ENVIRONMENT !== 'production'),
- 'cache_on' => FALSE,
- 'cachedir' => '',
- 'char_set' => 'utf8',
- 'dbcollat' => 'utf8_general_ci',
- 'swap_pre' => '',
- 'encrypt' => FALSE,
- 'compress' => FALSE,
- 'stricton' => FALSE,
- 'failover' => array(),
- 'save_queries' => TRUE
- );
- $this->db2 = $this->load->database( $second );
- }
- }
- // MINHA MODEL EXTENDS MY MODEL --------------------
- class Schedule_model extends MY_Model{
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * ------------------------------------------------------------------------------------------
- * Function select plan related to user id
- * ------------------------------------------------------------------------------------------
- *
- * @var strings
- * @param $idClient
- *
- */
- public function listQueryRequests( $idClient )
- {
- return $this->db2->select( '*' )->from( 'tbl_schedule_temporary' )
- ->where( 'id_client_system', $idClient )->where('check_flag IN( 0, 1 )' )
- ->get()->result();
- }
- AĆ da esse erro
- Message: Call to a member function select() on boolean
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement