From: Matthew G. <gr...@mu...> - 2004-03-12 23:16:07
|
Yup, I compared ADODB and PEAR. ADODB seemed to have the advantage in speed and DB support. On Fri, 2004-03-12 at 17:14, Charlie Smith wrote: > I'd be glad to do what I am able. aDid you attempt a PEAR port or > look into how that might work? I imagine you found the same types of > issues with queries utilizing empty string/nulls, functions > (password() now(), etc), bit manipulation? >=20 > >>> "Matthew Gregg" <gr...@mu...> 03/12/04 02:35PM >>> > Oh, and once we have mysql,sqlite,postrgres working, it should be > relatively easy to do the Oracle port. And since I don't have access > to > an Oracle DB, I'll need your help a good bit with that port. >=20 > btw: The files you've given me have helped a good deal with what I've > done so far. >=20 > On Fri, 2004-03-12 at 15:56, Charlie Smith wrote: > > Matthew: > > Where I gave you a ported phpESP to Oracle with abstracted oracle > > function calls, wouldn't you be able to include Oracle as one of the > > supported DB's? > > =20 > > To answer your query about abstracting DB queries. THe idea of a > hash > > sounds ok. I'm not sure you'd need to have the hash for all > queries.=20 > > Most of the queries between MySql and Oracle work against either DB. > I > > noticed that ones using bit manipulation and a few that use the > empty > > string had to be converted, but most went straight accross. If > there > > is only a small subset of queries that have to be modified to work > > under different DB's perhaps these could be isolated rather than > > rewriting all the queries. > > =20 > > Are you finding that most queries require modification to run agains > > all proposed DB's? > >=20 > > >>> "Matthew Gregg" <gr...@mu...> 03/12/04 12:48PM >>> > > I was thinking more along the lines of a separate include file per > DB. > > Each file contains all the SQL logic for the selected DB. Each SQL > > statement would be contained in a hash and access by a single > function > > that is passed the key. > >=20 > > include/lib/espsql_mysql.inc would contain something like this: > > $ESPSQL['admdesigner_delete_designer'] =3D "DELETE FROM > > ".$GLOBALS['ESPCONFIG']['designer_table']." WHERE username=3D$u AND > > realm=3D$r"; > >=20 > > then accessed as: > > $sql =3D eval(getSQL("admdesigner_delete_designer")); > >=20 > > On Thu, 2004-03-11 at 22:03, Ajay Patil wrote: > > > Dear Matthew, > > >=20 > > > I have subscribed to this list but it is my first time to post a=20 > > > message. I am sorry for not making any useful contribution=20 > > > towards PhpESP. > > >=20 > > > I have a suggestion about the switch for SQL calls for different > > DBS. > > >=20 > > > Perhaps, we can define all SQL calls in an properties file (or > XML). > > > Example: > > > SQL_Queries.properties. > > > ADD_QUESTION_SQL =3D "INSERT ...." > > > DELETE_QUESTION_SQL =3D "DELETE ..." > > >=20 > > > The application can read the SQL queries needed from the property > > file. > > > $sql =3D getSQL("ADD_QUESTION_SQL");=20 > > >=20 > > > This approach is similar to internationalization.=20 > > > We can keep a separate file for each target database. > > >=20 > > > I wonder if others have a better idea. > > >=20 > > > Ajay > > >=20 > > > ----------------------------------------------------------------- > > > =C3=83=C2=A5=C3=82=C2=B7=C3=82=C2=AE=C3=83=C2=A5=C3=A2=E2=82=AC=C2=A1= =C3=82=C2=BA=C3=83=C2=A4=C3=82=C2=BA=C3=82=C2=BA Matthew Gregg <greggmc@= musc.edu>=20 > > > =C3=83=C2=A9=C3=A2=E2=80=9A=C2=AC=C3=82=C2=81=C3=83=C2=A4=C3=82=C2=BF= =C3=82=C2=A1=C3=83=C2=A6=C3=A2=E2=82=AC=E2=80=9D=C3=82=C2=A5=C3=83=C2=A6=C3= =A2=E2=80=9E=C2=A2=C3=A2=E2=82=AC=C5=A1 2004=C3=83=C2=A5=C3=82=C2=B9=C3=82= =C2=B43=C3=83=C2=A6=C3=85=E2=80=9C=C3=8B=E2=80=A012=C3=83=C2=A6=C3=A2=E2=82= =AC=E2=80=9D=C3=82=C2=A5 > (=C3=83=C2=A9=C3=A2=E2=82=AC=C2=A1=C3=A2=E2=82=AC=CB=9C) =C3=83=C2=A5=C3= =82=C2=8D=C3=8B=E2=80=A0=C3=83=C2=A5=C3=A2=E2=82=AC=C2=B0=C3=82=C2=8D 11:= 14=20 > > > =C3=83=C2=A5=C3=82=C2=AE=C3=A2=E2=82=AC=C2=BA=C3=83=C2=A5=C3=A2=E2=82= =AC=C2=A6=C3=8B=E2=80=A0 phpESP-devel <php...@li...= t>=20 > > > =C3=83=C2=A4=C3=82=C2=BB=C3=82=C2=B6=C3=83=C2=A5=C3=82=C2=90=C3=82=C2= =8D [phpesp-dev] adodb port question.=20 > > >=20 > > > I've been slowly converting ESP over to us the ADODB[1] library > > > targeting mysql, postgres and sqlite as supported DB's. > > >=20 > > > I had hoped that adodb would provide enough DB abstraction that it > > would > > > be possible to do the port just by replacing the native php mysql > > > functions and SQL bits, with adodb equivalents. I have > approximately > > > 99% working in mysql, 70% sqlite, 10% postgres and it appears that > > to > > > get all the DB's working I will need to replace all/most SQL calls > > with > > > a function that implements a switch based on the current DB and > > returns > > > SQL appropriate for it. So my question is.. does this sound like > the > > > path I should take? Other suggestions? > > >=20 > > > > > > ______________________________________________________________________ > > > From: Matthew Gregg <gr...@mu...> > > > To: phpESP-devel <php...@li...> > > > Subject: [phpesp-dev] adodb port question. > > > Date: Wed, 31 Dec 1969 23:59:59 +0000 > > >=20 > > > I've been slowly converting ESP over to us the ADODB[1] library > > > targeting mysql, postgres and sqlite as supported DB's. > > >=20 > > > I had hoped that adodb would provide enough DB abstraction that it > > would > > > be possible to do the port just by replacing the native php mysql > > > functions and SQL bits, with adodb equivalents. I have > > approximately > > > 99% working in mysql, 70% sqlite, 10% postgres and it appears that > > to > > > get all the DB's working I will need to replace all/most SQL calls > > with > > > a function that implements a switch based on the current DB and > > returns > > > SQL appropriate for it. So my question is.. does this sound like > > the > > > path I should take? Other suggestions? > > >=20 > > > [1] http://php.weblogs.com/ADODB > > --=20 > > mcg > > ------------------------------------- > > The IT Lab (http://www.itlab.musc.edu) > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO > of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dclick > > _______________________________________________ > > phpESP-devel mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > --=20 > mcg > ------------------------------------- > The IT Lab (http://www.itlab.musc.edu) >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dclick > _______________________________________________ > phpESP-devel mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-devel --=20 mcg ------------------------------------- The IT Lab (http://www.itlab.musc.edu) |