Re: MySQLi Compat question
| From: | George Schlossnagle | Date: | Tue, 10 Jun 2003 02:25:40 +0000 |
| Subject: | Re: MySQLi Compat question | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17236@lists.php.net to get a copy of this message | ||
On Monday, June 9, 2003, at 07:59 PM, John Coggeshall wrote:
As I just asked in my reply to Rasmus -- does the 3.x client work with 4.1+ servers?No. Nor does the 4.1 client work with 3.x. And given the new free-as-in-fungal license on mysql 4, I think that there may be long-term continued use of 3.x for many many years to come.
I suspect there is a more clever way to handle this, but it's not coming to me right now. A critical piece of info is that the new mysqli functions don't make sense with v3, as most of the functionality they offer is just plain not supported. GeorgeActually it doesn't, and thats the major problem I see with it. You're looking for transparency, but you only get that if you edit all your scripts and include the compat library in every affected script. Even if I wasn't a freak about using too many includes ( a good reason not to stick this into auto_include), this puts a significant burden on the programmer trying to write portable code. By writing a compatibility layer into mysqli, you (assuming you compiled it correctly), get this compatibility transparently without having to change any userspace code.Point taken again. We all would be quite happy with a way of having a single mysql extension which just worked regardless of the version of the database you are connecting to. Unfortunately the only options I see to having a single extension talk both v3 and v4 are: 1) force all users to provide a link parameter (breaking PHP4 scripts) 2) make the link parameter optional in all cases (which Georg told me was the "one major disadvantage of the old API) 3) provide two versions of the same function for the two versions in one extension...