Making $db available globally |
(10-16-2021, 09:11 PM)iRedds Wrote: The controller is not the place for database queries You can still create a database object in a controller and invoke a method that queries or updates the database. You don't need to use the CI model class. He/she could do this in the BaseController and then it would be sort of "global".
Simpler is always better
|
Messages In This Thread |
Making $db available globally - by CodingInCodeigniter - 10-15-2021, 09:53 AM
RE: Making $db available globally - by includebeer - 10-16-2021, 06:56 AM
RE: Making $db available globally - by sr13579 - 10-16-2021, 04:50 PM
RE: Making $db available globally - by iRedds - 10-16-2021, 09:11 PM
RE: Making $db available globally - by donpwinston - 10-17-2021, 12:55 AM
RE: Making $db available globally - by includebeer - 10-17-2021, 04:28 AM
|