Welcome Guest, Not a member yet? Register   Sign In

Hello. My app has tables suffixes, for example:
SA1010 is a table for Enterprise 010 and SA1020 is a table for Enterprise 020.

I want to ask if a CodeIgniter has a native way to do that, I know that for prefixes it has:
$db['my_db']['dbprefix'] = "x";

Here is my solution:
In config/database.php: $db['my_db']['dbsuffix'] = "y";
In active record queries: $this->my_db->from('SA1' . $this->db_cliente->dbsuffix)<...>;

If you have a better solution please post here. Smile

Theme © iAndrew 2016 - Forum software by © MyBB