Welcome Guest, Not a member yet? Register   Sign In
Multiple Databases and Sessions Stored in DB

Lookings at the session library, looks like it is assumed ci_session table will be in the default DB.

(See System->Libraries->Session, version 1.7, Line 80)

I have a secondary DB config and the session table is in that.

According to the docs, to use multiple databases, you must capture output of load into $DB1 and $DB2, then use that as such (i.e. $DB1->query() etc.)

My questions:

Do I have to change the Session class or create my own to use a secondary DB?



UPDATE: Actually just changing line 80 from ->database() to ->database('second_db'); worked.

Theme © iAndrew 2016 - Forum software by © MyBB