[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Phpgroupware-developers] adodb
From: |
sigurdne |
Subject: |
RE: [Phpgroupware-developers] adodb |
Date: |
Tue, 23 Nov 2004 14:00:02 +0100 |
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