Welcome Guest, Not a member yet? Register   Sign In
Lazy database initialization
#1

[eluser]Sam Dark[/eluser]
If you want to connect to the DB only when needed — add following to your database.php:
Code:
$db['default']['autoinit'] = FALSE;
#2

[eluser]Yash[/eluser]
nice share Smile
#3

[eluser]Scriptor[/eluser]
Wait, I thought you had to explicity tell CI to automatically connect to the DB in the first place, otherwise you could tell it to connect when you load a model.
#4

[eluser]Sam Dark[/eluser]
Scriptor
Try it…




Theme © iAndrew 2016 - Forum software by © MyBB