phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-developers] adodb


From: Philipp Kamps
Subject: [Phpgroupware-developers] adodb
Date: Mon, 22 Nov 2004 18:20:20 +0100

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]