[Phplib-users] db_mysql.inc connect() & multiple databases
Brought to you by:
nhruby,
richardarcher
From: Mike G. <mi...@op...> - 2002-07-19 19:38:18
|
Hello, I'm just looking at db_mysql.inc now and it looks to me like it is structured such that the database criticals need to be hard coded into the defaults for the file: function connect($Database = db $Host = "localhost", $User = "user", $Password = "password") { I can't see a way around this without rewriting this clas so that it does not depend on the connect() function only using the default values. Shouldn't it just be pulling $Database, $Host, $User & $Password from the main script's config file? If there's a reason why it needs to be defined in two places I'd be interested in knowing.. I was hoping to just use a single instance of phplib to run a number of different sites (all accessing different databases on the same server) Mike -- Mike Gifford, OpenConcept Consulting, http://www.openconcept.ca Open Source Web Applications for Social Change. Featured Client - NDP Leadership Candidate - http://www.billblaikie.org "An unjust law is no law at all." - Saint Augustine |