[pmwiki-users] most user-friendly method of database configuration

Ben Stallings Ben at InterdependentWeb.com
Sat Oct 14 15:33:47 CDT 2006


Crisses wrote:
> You need an identifier though.  A nickname.  Because what if (gasp) you 
> have multiple mysql databases?  ADODB is database agnostic, so use an 
> agnostic method of addressing the database definitions -- then they can 
> be on any server, and multiple of the same type -- or from the same 
> program -- can be used:
> 
> $DQConnections['moodleA'] = array ();
>
> They're not much different from one another, just keep in mind that you 
> do need to give each database setting a unique name.

Each database already has a name; that's one of the parameters that has 
to be passed in order to make the connection.  Giving another name to 
the connection would be redundant, since there can be only one 
connection to a given database at a time, and it would also be 
transient, since $WikiLibDirs is an array of unnamed objects.

Besides, if admins add objects to $WikiLibDirs themselves, rather than 
relying on the script to do it, they will have the intriguing option of 
overwriting the default PageStore ($WikiLibDirs[0]) and thereby making 
their wikis database-driven... not that there's anything wrong with flat 
files at all, but if hypothetically you wanted a database-driven PmWiki, 
all you'd have to do is overwrite the default PageStore.

Enough talk.  I need to actually write this beast!  --Ben




More information about the pmwiki-users mailing list