[pmwiki-users] most user-friendly method of database configuration
gmane at auxbuss.com
Sun Oct 15 13:34:43 CDT 2006
> On Oct 15, 2006, at 1:19 PM, marc wrote:
> > Crisses said...
> >> One thing I notice while working on recipes is the (occasional)
> >> repetition of the same database connection data. And maybe while
> >> we're discussing a method of similar database abstraction (adodb) we
> >> should discuss a way to not have unnecessary repetition of database
> >> login info, while still allowing admins to access different databases
> >> if they want to. For example, maybe your pagestore is on the same
> >> server, maybe even the same database, as the authentication that
> >> would be accessed by AuthUserDBase. Why would the admin repeat the
> >> info?
> > I agree. My recipe collection runs parallel to the released recipes
> > for
> > just this reason.
> > (I'd also like to see the adoption of phpmailer too, btw.)
> ;) Sounds like the voice of a volunteer.
> What's phpmailer? newsletter mailer?
It's an email class.
I haven't looked elsewhere for a while, but I've used it for so long
that I think of it as a standard.
> >> Having a unique human-readable label for each database (and database
> >> connection!) would be helpful here. PHP has this wonderful way of
> >> allowing you to call function and name names by way of variables.
> >> $Databases['moodle'] = array(connection info...); // $Databases
> >> ['moodle']['type'] is "mysql"
> > Why not an array of db objects? Then 'type' is just an attribute of
> > the
> > object.
> > $dbtype = $db['moodle']->get_dbtype();
> Because that's not very much different than:
> $dbtype = $Databases['moodle']['type'];
Apples and oranges to me.
> thus doesn't warrant having to make a whole class layer for it.
What's a class layer? If you're instantiating the object, and its db
type is a necessary attribute for its constructor, then its type should
live with the object, surely.
> If you have good reasons sure -- but right now we're taking a big
> step as recipe authors to incorporate ADOdb. Doing so moves the
> database-using recipes out of the hands of the beginner cookbook
> authors (who can ask for help, and learn, but when you want to
> accomplish something quick and concrete that's often too much to ask!).
Okay, I'll back out here. I was trying to assist, because I already use
ADOdb in my recipes and have amended many existing recipes likewise.
More information about the pmwiki-users