Welcome Guest, Not a member yet? Register   Sign In
MSSQL Database Switching
#2

[eluser]rogierb[/eluser]
Why switch at all?

I create methods that can use multiple databases like
Code:
public function some_model_method($database, $var1)
{
  $database->where('varr', $var1)
  return $database->get('some_table')
}

I have a library method that loads databases on the fly when needed. It stores a reference of a database in a constant(of some sort). If the constant does not exsist, it loads the database.


Messages In This Thread
MSSQL Database Switching - by El Forum - 01-07-2010, 08:02 AM
MSSQL Database Switching - by El Forum - 01-07-2010, 09:19 AM
MSSQL Database Switching - by El Forum - 01-08-2010, 06:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB