diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-02 11:10:03 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-02 15:45:23 +0200 |
commit | ae3586869a7a85109cc5e38eccc862af1f09fa3c (patch) | |
tree | 51b902bfd37640797ace9a466cddfb984bb9499e | |
parent | fd37f6361496bf6c6d0133a0c9a66e7d921d0c7b (diff) | |
download | forums-ae3586869a7a85109cc5e38eccc862af1f09fa3c.tar forums-ae3586869a7a85109cc5e38eccc862af1f09fa3c.tar.gz forums-ae3586869a7a85109cc5e38eccc862af1f09fa3c.tar.bz2 forums-ae3586869a7a85109cc5e38eccc862af1f09fa3c.tar.xz forums-ae3586869a7a85109cc5e38eccc862af1f09fa3c.zip |
[feature/sqlite3] Remove unneeded ORDER BY type from sqlite_master queries
PHPBB3-9728
-rw-r--r-- | phpBB/includes/acp/acp_database.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/tools.php | 6 |
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')) { |