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

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

 



On Tue, 2007-12-11 at 13:02 +0900, Dave M G wrote:
> Zoltan, Per, Richard, Chris, Daniel, Larry,
> 
> Thank you for responding.
> 
> I have created a method in the class that handles my database 
> connections that will first test on extension_loaded(mysqli) before 
> connecting to the database.
> 
> Then I store the result in a session variable for reference, so future 
> calls will use the correct mysqli or "regular" syntax.
> 
> Thank you for helping me to find this solution. My scripts are that much 
> more portable now.

You use a session variable for that? That's entirely the wrong place to
store something like which database API is installed. It should a class
variable or global configuration variable. Heck, I'd say it's more
appropriate to do extension_loaded( 'mysqli' ) on every call than to use
a session variable.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

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