Hi !!
It does not work for me either. First the MySQL files for MDB2 are missing in the CVS (MDB2 Error: not found). I added them to the repository.
where did yuo get it ? the package i downloaded from http://pear.php.net/package/MDB2/download has the very same files as my cvs tree ?? (well, i missed just one file that i just added)
As far as I can see, the method rcube_mdb2::query extracts all arguments and passes them to rcube_mdb2::_query but they're never used to replace the ? within the SQL statement. I think this causes the Syntax error.
fixed.
For Postgres support I think we have to replace all 'NOW()' commands to lowercased 'now()'.
that's true ? looks very strange ... anyone using postgres can confirm this ?
I was also thinking of replacing the rcube_mdb2 class completely and call MDB2 methods directly form the steps. Just create the MDB2 object in rcube_init() and connect to the DB directly.
What do you think about this?
maybe it's not a good idea, mdb2 is still beta and does not support as many database backeds as pear does, maybe it's better to have both functional. Also having a first 'abstraction' layer at rcube_db will allow in the future to add or replace the database backend without effort.
To use UNIX_TIMESTAP we should fetch the raw date from the DB (simple SELECT changed_date ...) and convert it using the MDB2 method mdbstamp2Unix().
that has been solved using a different aproach, the rcube_db class has a function that returns the correct syntax for that function (this saves one query)