- $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM "._MYSQL_PREFIX."_themes ORDER BY id", __FILE__, __LINE__);
- while ($data = SQL_FETCHARRAY($result)) {
+ if (getExtensionVersion('theme') >= '0.0.7') {
+ $result = SQL_QUERY('SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id`', __FILE__, __LINE__);
+ } else {
+ $result = SQL_QUERY('SELECT id, theme_path, theme_active, theme_ver FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id`', __FILE__, __LINE__);
+ }
+ while ($content = SQL_FETCHARRAY($result)) {