}
// Gets an array (or false if none is found) from all supported engines
-function getArrayFromSupportedSqlEngines ($support = 'YES') {
+function getArrayFromSupportedSqlEngines ($requestedEngine = 'ALL') {
// Init array
$engines = array();
$result = SQL_QUERY('SHOW ENGINES', __FUNCTION__, __LINE__);
// Are there entries? (Bad if not)
- if (SQL_NUMROWS($result) > 0) {
+ if (!SQL_HASZERONUMS($result)) {
// Load all and check for active entries
while ($content = SQL_FETCHARRAY($result)) {
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'support=' . $requestedEngine . ',Engine=' . $content['Engine'] . ',Support=' . $content['Support']);
+
// Is this supported?
- if (($support == 'ALL') || ($content['Support'] == $support)) {
+ if ((($requestedEngine == 'ALL') || ($content['Engine'] == $requestedEngine)) && (in_array($content['Support'], array('YES', 'DEFAULT')))) {
// Add it
array_push($engines, $content);
} elseif (isDebugModeEnabled()) {
// Log it away in debug mode
- logDebugMessage(__FUNCTION__, __LINE__, 'Engine ' . $content['Engine'] . ' is not supported (' . $content['Supported'] . ' - ' . $support . ')');
+ logDebugMessage(__FUNCTION__, __LINE__, 'Engine ' . $content['Engine'] . ' is not supported (' . $content['Supported'] . ' - ' . $requestedEngine . ')');
}
} // END - if
} else {