diff options
author | June McEnroe <june@causal.agency> | 2019-12-30 22:24:44 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-12-30 22:24:44 -0500 |
commit | d7f2a52abfefbe2a794a13b98645400143b475ee (patch) | |
tree | cf9062820c427fb8d889b2a31727a6fa0d47a998 /litterbox.c | |
parent | Use X macro for Type enum (diff) | |
download | litterbox-d7f2a52abfefbe2a794a13b98645400143b475ee.tar.gz litterbox-d7f2a52abfefbe2a794a13b98645400143b475ee.zip |
Order results by ID in outer query in litterbox
Diffstat (limited to 'litterbox.c')
-rw-r--r-- | litterbox.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/litterbox.c b/litterbox.c index 3ede752..af531ff 100644 --- a/litterbox.c +++ b/litterbox.c @@ -216,7 +216,8 @@ static void querySearch(struct Message *msg) { ELSE names.user END, events.target, - highlight(search, 6, :bold, :bold) + highlight(search, 6, :bold, :bold), + events.event FROM events JOIN contexts ON contexts.context = events.context JOIN names ON names.name = events.name @@ -227,7 +228,7 @@ static void querySearch(struct Message *msg) { ORDER BY events.time DESC, events.event DESC LIMIT :limit ) - SELECT * FROM results ORDER BY context, time; + SELECT * FROM results ORDER BY context, time, event; ); dbPersist(&stmt, sql); dbBindText(stmt, ":bold", "\2"); |