aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/acp/acp_database.php2
-rw-r--r--phpBB/phpbb/db/tools.php6
2 files changed, 3 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index fd97e6ee08..51715141eb 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -1081,7 +1081,7 @@ class sqlite3_extractor extends base_extractor
FROM sqlite_master
WHERE type = 'table'
AND name = '" . $db->sql_escape($table_name) . "'
- ORDER BY type DESC, name;";
+ ORDER BY name ASC;";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index addb57ac0a..a983ed91b5 100644
--- a/phpBB/phpbb/db/tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -2755,8 +2755,7 @@ class tools
$sql = "SELECT sql
FROM sqlite_master
WHERE type = 'table'
- AND name = '{$table_name}'
- ORDER BY type DESC, name;";
+ AND name = '{$table_name}'";
$result = $this->db->sql_query($sql);
$sql_create_table = $this->db->sql_fetchfield('sql');
$this->db->sql_freeresult($result);
@@ -2770,8 +2769,7 @@ class tools
$sql = "SELECT sql
FROM sqlite_master
WHERE type = 'index'
- AND tbl_name = '{$table_name}'
- ORDER BY type DESC, name;";
+ AND tbl_name = '{$table_name}'";
$result = $this->db->sql_query($sql);
while ($sql_create_index = $this->db->sql_fetchfield('sql'))
{