Monday 25 February 2019

Should my app have 1 DB file, or have queries spread throughout

Is it good practice to have 1 db file that contains all the queries that will be needed in my app, or have them spread out. Currently, I have 1 db file that creates the db connection with my MySQL database, and is called in every single one of my controller files. Each controller file then has a bunch of functions/queries needed for that controller. Which is better practice?

Submitted February 25, 2019 at 09:53PM by ortz3

No comments:

Post a Comment