Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

Multiple databases setup

$
0
0
Hi All,

Can anyone help me out with the following:

I setup project with a database for administration of customers and their users.
They login according to the rights as set in the admin database/user table.

After login they are connected to their own database. This works ok.

I want to get some data from the 'customer' database. Which event can I use?

I tried 'AfterSuccessfulLogin' but it doesn't work as expected:

$srs = DB::Query("select * from settings");
while ($sdata = $srs->fetchAssoc()) {
  $_SESSION["OrderTableId"]=$sdata["OrderTableId"];
}


$_SESSION["OrderTableId"] is empty after this.

The same result when I use AfterAppInit.

Should I use a different event? Or do I have to force a new connection?

Any help is welcome!

Viewing all articles
Browse latest Browse all 2586