$ce = DB_DataObject::factory('core_enum');
- $ce->query("select engine from information_schema.tables where table_schema='hydra' and table_name = 'core_enum'");
+ $ce->query("select engine from information_schema.tables where table_schema='$ce->database()}' and table_name = '{$tbl}'");
$ce->fetch();