|
From: Kevin <ke...@dr...> - 2005-11-16 20:59:03
|
> I'll have a look at it tonight. I think supporting other databases is > perhaps a good idea - though I'm concerned about the expense to > readability of the code. I think a huge benefit to FoFRedux is the > simplicity and understability of the code for users and hackers (like > ourselves) to modify. > > Are there directions on setting up another db? Ideally, if the db type is supported by ADODB, then you just change the FOF_DB_TYPE constant in config.php. Everything should work. If there ar= e problems, you can set FOF_DEBUG to true, which will print out all the SQL and any database errors. From there you should be able to work out any compatiblity problems. This is my first attempt at using ADODB. For someone to jump into the code without having used ADODB before, it would require a bit of RFTM to learn how ADODB works. The only thing that requires a little extra effor= t is handling of date/timestamps and boolean values. Their usage is usuall= y different with different databases, so it took me a bit to learn how to handle them correctly in a cross-platform way. --- Kevin > In related news - I finished most of the baseline mods last night - > just need to add "Search" into the fofredux code from my personal > modified fof. > > Andy > > On 11/16/05, Kevin <ke...@dr...> wrote: >> >> Here's a link to my work. Please have a look and let me know if you >> guys >> think this is a good direction to go in. >> >> http://www.drule.org/fofredux-adodb.tar.gz >> >> > >> > Hi, I've been working on cleaning up the database code and making it >> more >> > easily portable to other RDBMSs. >> > >> > I started by converting it to use PEAR_DB. Athough I eliminated al= l >> the >> > "mysql_" function calls, the queries and table structure is still ve= ry >> > mysql specific. >> > >> > A couple of days ago I scraped my PEAR_DB work and started working >> with >> > ADODB. I am *very* pleased with the results so far. I have it >> working >> > fairly well on both mysql and postgresql. >> > >> > One of the nice features of ADODB is its support for handling databa= se >> > metadata an abstract (non-dbms specific) way. >> > >> > http://phplens.com/lens/adodb/docs-datadict.htm >> > >> > By using the $dict->ChangeTableSQL() method, It will either: create >> the >> > table if it is missing, or alter the table to match the definition >> > provided. >> > >> > This will make upgrading the database on an existing FoF/FoFR >> installation >> > quite easy. >> > >> > --- >> > Kevin >> > >> > >> >> From: Benjamin Stewart <bsii@cr...> >> > >> >> >> >> One thing we need to come up with a solution for is how to handle >> > changes >> >> that require database changes. We need ways of knowing which >> features >> > require which database changes, so we know whether or not any given >> > database >> >> change needs to be included in an updater. This, by the way, is on= e >> of >> > the >> >> biggest problems I've never been able to solve really well in past >> > lives. >> >> >> >> --Benjy >> > >> > -- >> > Kevin >> > >> > >> > >> > >> > >> > >> > >> > >> > ------------------------------------------------------- >> > This SF.Net email is sponsored by the JBoss Inc. Get Certified Toda= y >> > Register for a JBoss Training Course. Free Certification Exam >> > for All Training Attendees Through End of 2005. For more info visit: >> > http://ads.osdn.com/?ad_idv28&alloc_id=16845&op=3Dclick >> > _______________________________________________ >> > Fofredux-devel mailing list >> > Fof...@li... >> > https://lists.sourceforge.net/lists/listinfo/fofredux-devel >> > >> >> >> -- >> Kevin >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by the JBoss Inc. Get Certified Today >> Register for a JBoss Training Course. Free Certification Exam >> for All Training Attendees Through End of 2005. For more info visit: >> http://ads.osdn.com/?ad_idv28&alloc_id=16845&opclick >> _______________________________________________ >> Fofredux-devel mailing list >> Fof...@li... >> https://lists.sourceforge.net/lists/listinfo/fofredux-devel >> > > > -- > Andrew Turner > ajt...@hi... 42.4266N x 83.4931W > http://highearthorbit.com Northville, Michigan, USA > idealistic technocrat > > Photos - http://flickr.com/photos/ajturner > Travel - http://highearthorbit.com/projects/location/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. Get Certified Today > Register for a JBoss Training Course. Free Certification Exam > for All Training Attendees Through End of 2005. For more info visit: > http://ads.osdn.com/?ad_idv28&alloc_id=16845&op=3Dclick > _______________________________________________ > Fofredux-devel mailing list > Fof...@li... > https://lists.sourceforge.net/lists/listinfo/fofredux-devel > --=20 Kevin |