Re: Mysqli support - test or complain? [SOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx		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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux