Welcome Guest, Not a member yet? Register   Sign In
Help with database load design
#6

@jarmen_kell - that's basically what I've already got in place with the core model setting up db config for the user in the constructor. However, as it stands it would still create a new connection for each model that is based on the core. The use of the static property for the db did set me on the right path though. By using a static property for the db in the core class and adding the code proposed by phpforever2017 in the constructor to test if the db connection had already been set I was able to ensure that the core class only ever established a single db connection.

Thanks for the help. Much appreciated.
Reply


Messages In This Thread
Help with database load design - by NickBrown1968 - 08-09-2017, 07:38 AM
RE: Help with database load design - by Diederik - 08-11-2017, 02:57 AM
RE: Help with database load design - by NickBrown1968 - 08-13-2017, 11:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB