Home » Logging » Log » Bug #4771
MDB2 support
Details
| Request #4771 | MDB2 support |
|---|---|
| Submitted | 2005-07-08 22:48 UTC |
| From | max1 at tvattomaten dot se |
| Assigned | jon |
| Status | Closed |
| Package | Log |
| PHP Version | 4.3.11 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-07-08 22:48 UTC] max1 at tvattomaten dot se
Description:
------------
It would be nice to add MDB and MDB2 support to the Log package. I've looked through the sql code and it seems that the main difference is nextId which in MDB2 is incorrectly named nextID...
Can't you just add a
if (defined(MDB2_OK))
{
define("LOG_DATABASE_LAYER", "MDB2");
}
else...
require_once LOG_DATABASE_LAYER . ".php";
and do some short if-clause for the nextID issue, perhaps also change function open(), so that it calls the right class constructor...
[2005-07-09 12:12 UTC] max1 at tvattomaten dot se
It seems there is a wrapper class in MDB2, perhaps that one can be used. I'm not sure if it matters but it would be nice not to have to load both MDB2 and DB classes since it would mean a lot unnecessary code for php to process...
Another possibility is to use:
if (array_search("DB.php", get_included_files()))
{
define("LOG_DATABASE_LAYER", "DB");
}
elseif(array_search("DB.php", get_included_files()))
{
define("LOG_DATABASE_LAYER", "MDB2");
}
else
{
define("LOG_DATABASE_LAYER", "DB");
}