The ADOdb port is now at a point where folks that are interested in
seeing/testing it, can have at it. It is available here[1]. You'll
need to install ADOdb[2] as well.
I didn't go the route of my previous posts(breaking out all the SQL
calls into includes), but instead was able to use the exist SQL with
ADOdb abstraction.
Several new options have been added to phpesp.ini.php that need to be
configured.
// ADODB
$ESPCONFIG['adodb_path'] = '/usr/share/adodb/';
^-should point to where your ADOdb is installed
$ESPCONFIG['adodb_database_type'] = 'mysql';
^-mysql, postgres, sqlite
$ESPCONFIG['adodb_dbpersist'] = 'true';
^-use persistent DB connections
$ESPCONFIG['adodb_pathto_db'] = "/var/www/phpESP/scripts/db/esp.dbm";
^- if you are using sqlite, where is the database located.
I've added populate scripts for postgresql and sqlite:
mysql:
- mysql -u root -p < scripts/db/mysql_create.sql
- mysql -u root -p phpesp < scripts/db/mysql_populate.sql
postgresql:
- psql -U youruser -h yourhost phpesp
< scripts/db/postgres_populate.sql
sqlite:
- sqlite esp.dbm < scripts/db/sqlite_populate.sql
- esp.dbm needs to be read/write and the directory it's located in
also needs read/write by your Apache user.
Known bugs:
When using sqlite question ordering only works one way
Unknown bugs:
Probably many.
TODO:
More code cleanup and testing.
Decide if we should include ADOdb with phpESP.
Please download, install, test and comment.
Thanks.
[1] http://bfs.itlab.musc.edu/~greggmc/devel/phpESP/phpesp_adodb.tar.gz
[2] http://php.weblogs.com/ADODB
--
mcg
-------------------------------------
The IT Lab (http://www.itlab.musc.edu)
|