Re: Mysqli support - test or complain?

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

 



Dave M G wrote:

> Richard said:
>  > Alter your program to support both - use mysqi if it's avilable,
>> mysql if it's not.
> 
> How exactly do I test for the presence of mysqli from within a script?
> Or are you saying I have two different versions of my script?

I think you can test for the availability of an extension, but I don't
know how.  I'm sure someone will be able to tell us. 

To enable your script to use one or the other, you could wrap each
database call in your own "mysqldave()", which would check the mysqli
availability and call the appropriate API.  You'd obviously check the
mysqli availability at startup, then store the status somewhere for
your wrapper to query. 



/Per Jessen, Zürich

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