Re: Mysqli support - test or complain? [SOLVED]
| From: | Larry Garfield | Date: | Wed, 12 Dec 2007 03:03:04 +0000 |
| Subject: | Re: Mysqli support - test or complain? [SOLVED] | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265736@lists.php.net to get a copy of this message | ||
On Tuesday 11 December 2007, Per Jessen wrote:
> Stut wrote:
> > I couldn't care less what your domain name is, you're still advocating
> > a poor choice IMHO.
>
> I have been trying hard not to join this thread, but ... apart from the
> principle, what's _really_ so poor about it? Having to write
> application code that needs to work with two different APIs is poor
> enough, using a session variable for keeping a status won't make it
> much worse. So what if the status is server-scope, yet kept in
> user-scope. In particular if the app already uses session storage.
Are you saying there's something wrong with doing something non-stupid "on
principle"? Any employer that wants me to cut even small corners like that
to do something sloppy to save the 10 seconds it would take to do it right
can find a new programmer, thank you. (The market is good enough that you
can say that, if you're good enough.) You could also make every property of
an object public, or always use an input/output parameter to a function
instead of a return. They would all work. That doesn't mean any of those
aren't dumb.
For all those suggesting that adding an if() check is better than caching it
to the session, you're right. It's also still less than optimal.
You have a database config file somewhere that stores your database
credentials. Put which DB driver to use in there. It's not like it's going
to change, and you have to edit that file anyway to install the app. It's
part of the database configuration. Most of the open source systems I've
seen do that in some form or another. And if you don't know what driver you
have on your system, it's not like it's hard to try one, watch it die, and
then use the other. :-)
How did this get so complicated?
--
Larry Garfield AIM: LOLG42
larry@garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson