Re: MySQLi Compat question

From: Date: Mon, 09 Jun 2003 23:59:13 +0000
Subject: Re: MySQLi Compat question
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17232@lists.php.net to get a copy of this message
> If by 'true' you mean 4.1, then yes, but it doesn't resemble the 3.x > api. There was a major API shift from 3->4. Yes, that's exactly what I meant. > > it seems more reasonable to just have the solution be in user-space > > instead of starting down the road of aliases and non-api calls again > > (although mysqli does still have a few non-api PHP functions still -- > > look in mysqli_nonapi.c). > > And can just as easily have a mysqli_compat.c point taken :) > mysqli won't be the standard for a while, as it doesn't work with mysql > 3.x. As I just asked in my reply to Rasmus -- does the 3.x client work with 4.1+ servers? > Actually 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... -John -- -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- John Coggeshall john at coggeshall dot org http://www.coggeshall.org/ -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

« previous php.pear.dev (#17232) next »