Welcome Guest, Not a member yet? Register   Sign In
Destructor and Database Connection
#1

[eluser]petewulf[/eluser]
Hello there,

i'm new to codeigniter and currently developing my first project with it. I have implemented many own classes which have to interact with the database itself and have to read data in the Constructor and write them back in the Destructor.

The Problem is, that when the Destructor on my own class is called, the Database connection is already closed by CI and i have to manually reconnect or create a method which is called at the end of the code. This is not a very smooth way to code i think so my question is if there is any possibility to close the CI_DB later?

Wouldn't it be a nice feature if the classes are destructed from 'inside' to 'outside', so that all CI core functions are still accessible till the end?

Regards,
Daniel


Messages In This Thread
Destructor and Database Connection - by El Forum - 12-01-2008, 03:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB