CI4 .env file connecting to multiple databases not working |
02-02-2021, 08:59 AM
(This post was last modified: 02-02-2021, 09:00 AM by gosocial2. Edit Reason: to format code snippet )
I've had a similar problem where I was able to define connection to the second database, but the convenience model methods (such as $theModel->findAll() ) not working on models based on the 2nd database.
Consider: Code: $modelBasedOnDb1 = model('model1'); // using $db1 (I used pseudo-names to describe the problem) I ended up merging 3 databases in a single database because of this problem. (Happened with CI 4.0.4 - I haven't tried again with CI 4.1.x) CodeIgniter Wizard (CRUD code generator for Mac) instantly scaffolds Bootstrap-based web applications with an administrative interface (admin templates include Bootstrap5) |
Messages In This Thread |
CI4 .env file connecting to multiple databases not working - by Kaosweaver - 02-01-2021, 11:38 AM
RE: CI4 .env file connecting to multiple databases not working - by kenjis - 02-02-2021, 12:48 AM
RE: CI4 .env file connecting to multiple databases not working - by Kaosweaver - 02-02-2021, 05:56 AM
RE: CI4 .env file connecting to multiple databases not working - by gosocial2 - 02-02-2021, 08:59 AM
|