![]() |
database problem? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: database problem? (/showthread.php?tid=48742) |
database problem? - El Forum - 01-27-2012 [eluser]Bigil Michael[/eluser] Hi frnds, i want to know is it possible to use multiple database for the same project???? can any one answer please?????? database problem? - El Forum - 01-27-2012 [eluser]Aken[/eluser] Yes. http://ellislab.com/codeigniter/user-guide/database/connecting.html database problem? - El Forum - 01-27-2012 [eluser]Bigil Michael[/eluser] now i have created 2 databases like this Code: $active_group = "test1"; some tables are in the db city1 remaining in city2 but when i execute my project it shows some tables are missing. can anyone help me??? database problem? - El Forum - 01-27-2012 [eluser]talentsfromindia[/eluser] You may use as many database as you can for the same project but the point is you need to make a proper connection between the two database which you are using so as to retain all the data without getting the reduct ant one and also without missing the important data by using proper schemas . database problem? - El Forum - 01-27-2012 [eluser]Bigil Michael[/eluser] can you point out what is the mistake i made in this code ???? database problem? - El Forum - 01-28-2012 [eluser]InsiteFX[/eluser] you can only have one active group at a time! Code: $DB1 = $this->load->database('test1', TRUE); CodeIgniter User Guide - Database Connections database problem? - El Forum - 01-29-2012 [eluser]Bigil Michael[/eluser] when i use these steps Code: $DB1 = $this->load->database('test1', TRUE); it shows an error Code: Fatal error: Call to a member function where() on a non-object in C:\xampp\htdocs\citimapia\bangalore\system\application\models\home_model.php this is the portion it shows an error Code: $DB1->where('status', '1'); can anyone help me to solve my problem??? database problem? - El Forum - 01-29-2012 [eluser]Bigil Michael[/eluser] now i print the value like this Code: $DB1 = $this->load->database('test1', TRUE); and the output is DB1: Resource id #44, DB2: Resource id #46 but when i use DB2 in my model it shows an error Quote:Undefined variable: DB2anybody know what is the mistake i made????... database problem? - El Forum - 01-30-2012 [eluser]InsiteFX[/eluser] Try Code: $this->db->reconnect(); database problem? - El Forum - 01-30-2012 [eluser]Bigil Michael[/eluser] now i solved my problem like this Code: class Home_model extends Model { Code: $this->DB1->where('status', '1'); |