Welcome Guest, Not a member yet? Register   Sign In
database, model loading in MVC
#6

(This post was last modified: 01-28-2023, 08:26 AM by superior.)

(01-28-2023, 08:19 AM)nadeem14375 Wrote:
(01-28-2023, 01:21 AM)kenjis Wrote: If you really need a model in a view, load it in a controller and pass it to a view.
https://www.codeigniter.com/user_guide/o...o-the-view

In model where can I define the another / second database connection, so can be used by multiple functions in model, I tried Construct but no luck. I am using Codeigniter 4.

> See: https://codeigniter.com/user_guide/datab...parameters
> See: https://codeigniter.com/user_guide/model...e-database
> See: https://codeigniter.com/user_guide/datab...-databases
Reply


Messages In This Thread
database, model loading in MVC - by nadeem14375 - 01-27-2023, 10:48 PM
RE: database, model loading in MVC - by InsiteFX - 01-28-2023, 12:03 AM
RE: database, model loading in MVC - by kenjis - 01-28-2023, 01:21 AM
RE: database, model loading in MVC - by superior - 01-28-2023, 08:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB