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

[eluser]Akinzekeel[/eluser]
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.

Regards
#2

[eluser]WanWizard[/eluser]
You can modify the prefix using
Code:
$this->db->dbprefix = 'new_';
#3

[eluser]Akinzekeel[/eluser]
Just what I needed, thanks!
#4

[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