Welcome Guest, Not a member yet? Register   Sign In
Change dbprefix during runtime?

Hi everyone,

first of all I'd like to thank all the developers of CodeIgniter for this great framework. I discovered it about 2 months ago and I love it!

Here's my question: Is it possible to change the prefix of the table names (when using Active Record) later during the runtime, perhaps in a controller function? Or can I completely turn prefixing off for a specific controller function?

Any help would be appreciated.


You can modify the prefix using
$this->db->dbprefix = 'new_';

Just what I needed, thanks!

[eluser]Ben Bowler[/eluser]
Can this be done for one library or model? or only when querying a specific table?

Theme © iAndrew 2016 - Forum software by © MyBB