Date: 08/02/00
- Next message: Jacob Bower: "[phplib] Problem with sessions, MySQL insert error."
- Previous message: Jeff Seely: "[phplib] phpslash-ft?"
- Next in thread: layne <email protected>: "RE: [phplib] Multiple database handling in one app. What if ...?"
- Maybe reply: layne <email protected>: "RE: [phplib] Multiple database handling in one app. What if ...?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Good day (night ? :)) everybody.
PHP reuses database connections, so it's impossible to handle two or
more database connections that use similar connection parameters (as I
know) simultaneously - you'll get the same results in all opened
"connections". But what if one introduces several classes inherited
DB_Sql with different connection parameters, e.g:
class DB_Data extends DB_Sql {
var $Host = "localhost";
var $Database = "data";
var $User = "datauser";
var $Password = "password"
........................
}
class DB_Sessions extends DB_Sql {
var $Host = "localhost"; # or any other host
var $Database = "sessions";
var $User = "sessuser";
var $Password = "otherpassword";
.........................
}
etc ...
Then in container class we define DB_Sessions as database class, as in
User, Auth and other "service" classes, and DB_Data goes in any other
case, just to retreive non-session and user data.
Did anybody tried this setup at work?
-- Best regards, Max A. Derkachev mailto:kot <email protected> Symbol-Plus Publishing Ltd. phone: +7 (812) 265-0054, 265-1228, phone/fax: 567-8775 http://www.Books.Ru -- All Books of Russia--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Jacob Bower: "[phplib] Problem with sessions, MySQL insert error."
- Previous message: Jeff Seely: "[phplib] phpslash-ft?"
- Next in thread: layne <email protected>: "RE: [phplib] Multiple database handling in one app. What if ...?"
- Maybe reply: layne <email protected>: "RE: [phplib] Multiple database handling in one app. What if ...?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

