diff --git a/main/db.c b/main/db.c index 96c814515a44b2f2a062dee46c086b4ebbcd30de..381931b489ffa32d13236999b231731d747fe7cb 100644 --- a/main/db.c +++ b/main/db.c @@ -119,8 +119,8 @@ DEFINE_SQL_STATEMENT(get_stmt, "SELECT value FROM astdb WHERE key=?") DEFINE_SQL_STATEMENT(del_stmt, "DELETE FROM astdb WHERE key=?") DEFINE_SQL_STATEMENT(deltree_stmt, "DELETE FROM astdb WHERE key || '/' LIKE ? || '/' || '%'") DEFINE_SQL_STATEMENT(deltree_all_stmt, "DELETE FROM astdb") -DEFINE_SQL_STATEMENT(gettree_stmt, "SELECT key, value FROM astdb WHERE key || '/' LIKE ? || '/' || '%'") -DEFINE_SQL_STATEMENT(gettree_all_stmt, "SELECT key, value FROM astdb") +DEFINE_SQL_STATEMENT(gettree_stmt, "SELECT key, value FROM astdb WHERE key || '/' LIKE ? || '/' || '%' ORDER BY key") +DEFINE_SQL_STATEMENT(gettree_all_stmt, "SELECT key, value FROM astdb ORDER BY key") DEFINE_SQL_STATEMENT(showkey_stmt, "SELECT key, value FROM astdb WHERE key LIKE '%' || '/' || ?") DEFINE_SQL_STATEMENT(create_astdb_stmt, "CREATE TABLE IF NOT EXISTS astdb(key VARCHAR(256), value VARCHAR(256), PRIMARY KEY(key))")