Help with database load design |
@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. |
Messages In This Thread |
Help with database load design - by NickBrown1968 - 08-09-2017, 07:38 AM
RE: Help with database load design - by jarmen_kell - 08-09-2017, 06:39 PM
RE: Help with database load design - by phpforever2017 - 08-10-2017, 01:29 PM
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, 10:58 AM
RE: Help with database load design - by NickBrown1968 - 08-13-2017, 11:06 AM
|