CodeIgniter Forums
Multiple Schema Postgre - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Multiple Schema Postgre (/showthread.php?tid=73791)



Multiple Schema Postgre - Geetha - 06-06-2019

Hi,

How to set Multiple Schema Postgre in CodeIgniter 3 ?

Am tried like ,

Code:
$table_schema = examination,academics;
$this->setSchema($table_schema);
Code:
public function setSchema($table_schema) {
       if(!$table_schema) {
           return false;
       }
       if($this->db->dbdriver == 'postgre') {
           $this->db->simple_query('SET search_path TO ' . $table_schema . ',public');
       }    
   }
Not working Set first schema examination only, Please tell me how to set multiple Schema ??