[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Phpgroupware-developers] adodb
From: |
Philipp Kamps |
Subject: |
RE: [Phpgroupware-developers] adodb |
Date: |
Tue, 23 Nov 2004 14:58:34 +0100 |
Hi sigurdne,
your example will work because you get the resultSet
(not the db object) into $dbresult/$dbresults2.
Generally I would say in case you use two loops
of resultSets you will be able to optimize your
sql statements to one single on.
Which is a lot more performant and easier to read
in the code.
We propably would improve phpgroupware if we change
this.
Thanks for your feedback.
Cheers, fips
P.S. Setup with adodb is running now.
Am Di, den 23.11.2004 schrieb sigurdne um 14:00:
> adodb is used in the proposal-branch like this:
>
> $dbresult = $GLOBALS['phpgw']->db->Execute("SELECT column_name from ...");
> while (!$dbresult->EOF)
> {
> $dbresult2 = $GLOBALS['phpgw']->db->Execute("SELECT " .
> $dbresult->fields['column_name'] . "from ...");
> while (!$dbresult2->EOF)
> {
> $list[] = $dbresult2->fields[$dbresult->fields['column_name']];
> $dbresult2->MoveNext();
> }
> $dbresult->MoveNext();
> }
>
> Sigurd
>
> >===== Original Message From Philipp Kamps <address@hidden> =====
> >Hi ya'll,
> >
> >this time in english ;-)
> >
> >Patch 3496 includes adodb to the api.
> >========================================
> >
> >You may access this new object by using
> >$GLOBALS['phpgw']->adodb.
> >
> >The original db layer
> >(class.db.inc.php - $GLOBALS['phpgw']->db)
> >is still valid.
> >I changed the original db layer in a way that
> >it internally uses adodb.
> >
> >Adodb supports _a lot_ of different database
> >systems:
> >http://phplens.com/adodb/supported.databases.html
> >
> >So far for the good news.
> >=========================================
> >
> >Practically phpgw _won't_ run on so much different
> >database systems. One import reason is the use of
> >reserved key words for some database systems
> >(http://wiki.phpgroupware.org/index.php?page=SQL+reserved+key+words)
> >
> >In order to make the transparent db layer (class.db.inc.php)
> >working we have to adapt phpgroupware:
> >
> >- a direct access to the objects vars won't be able
> > ($GLOBALS['phpgw']->db->Record)
> >
> >- adodb uses a singleton class to return one unique object
> > Following code will fail:
> > $db2 = $GLOBALS['phpgw']->db;
> > $GLOBALS['phpgw']->db->query('blabla');
> > while($GLOBALS['phpgw']->nextRecord)
> > {
> > $db2->query('blubblub');
> > }
> >
> >- I haven't found the according methods lock/unlock as methods
> > in adodb.
> >
> >Additional notes:
> >==========================================
> >
> >- $GLOBALS['phpgw']->adodb is a reference to
> > $GLOBALS['phpgw']->db->adodb
> >
> >- class.db.inc.php as transparent db layer isn't finished. I
> > still have to impliment some methods.
> >
> >- I was able to setup a new phpgroupware. But I'm pretty sure
> > that some parts of the install routine isn't working properly.
> >
> >- Most modules were able to come up with their index page.
> > But they fail on some other pages. This is because of the
> > reasons I wrote before.
> >
> >- All original db drivers (class.db_sql.inc.php) will not
> > be necessary anymore.
> >
> >Cheers, fips
> >
> >
> >
> >
> >_______________________________________________
> >Phpgroupware-developers mailing list
> >address@hidden
> >http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
>
>
>
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
--
Philipp Kamps
- Team Softwareentwicklung -
pro|business AG
Expo Plaza 1
30539 Hannover
Telefon 05 11 / 6 00 66 - 333
Telefax 05 11 / 6 00 66 - 355
E-Mail address@hidden
*******************************************
eMail Management -
Wege aus der eMail-Flut, Rechte & Pflichten
Unser Thema am 24.11.2004 in Hannover
und am 25.11.2004 in Frankfurt
Mehr dazu unter www.probusiness.de/aktuelles/
*******************************************