Welcome Guest, Not a member yet? Register   Sign In
New User - question on $this->load->database()
#3

[eluser]apodner[/eluser]
Appreciate the reply, but it seems as though autoload will make a DB connection, even on a page that doesn't require one. I guess I am just a bit of a control freak, I only want the db connection when I need it, and I only want it opened one time per page.

However, this may be moot, as I am not seeing a way to pass the db object into the model constructor via a parameter using $this->load->model('Mymodel'). Seems like it would work if it was a library or if I establish a separate connect method in the model, which seems like overkill as well.

Thanks again!





Messages In This Thread
New User - question on $this->load->database() - by El Forum - 11-21-2012, 09:16 PM
New User - question on $this->load->database() - by El Forum - 11-21-2012, 10:14 PM
New User - question on $this->load->database() - by El Forum - 11-22-2012, 05:36 AM
New User - question on $this->load->database() - by El Forum - 11-22-2012, 06:15 AM
New User - question on $this->load->database() - by El Forum - 11-22-2012, 06:18 AM
New User - question on $this->load->database() - by El Forum - 11-24-2012, 02:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB