From 75cd51ea2ffd6d89c71f64213ba85ee5214b6973 Mon Sep 17 00:00:00 2001 From: alexhudson Date: Wed, 30 May 2007 21:39:05 +0000 Subject: [PATCH] SQL query change to make Bongo work with SQLite 3.3.17. We should review the main DStoreListConversations() query to see if we can do things better... --- src/agents/store/db.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/agents/store/db.c b/src/agents/store/db.c index a7ca3a6..7ef3f54 100644 --- a/src/agents/store/db.c +++ b/src/agents/store/db.c @@ -869,6 +869,7 @@ DStoreCancelTransactions(DStoreHandle *handle) " docs.conversation, docs.listid," \ " docs.uid, docs.summary, docs.location, docs.stamp " #define CONVINFO_COLS " docs.guid, docs.info, conversations.subject " +#define CONVINFO_COLSAS " docs.guid as guid, docs.info as info, conversations.subject as subject" #define EVENTINFO_COLS " events.guid, docs.info, " \ " 0, 0, 0, 0, 0, 0, " \ " docs.uid, docs.summary, docs.location, docs.stamp " @@ -1989,7 +1990,7 @@ DStoreListConversations(DStoreHandle *handle, used too much... */ stmt = SqlPrepare(handle, - "SELECT" CONVINFO_COLS ", conversations.date " + "SELECT" CONVINFO_COLSAS ", conversations.date AS date " "FROM conversations " "JOIN docs " " ON docs.guid = conversations.guid " @@ -2029,7 +2030,7 @@ DStoreListConversations(DStoreHandle *handle, " ORDER BY conversations.date DESC, docs.guid DESC " " LIMIT ?4) " - "ORDER BY conversations.date DESC, docs.guid DESC;", + "ORDER BY date DESC, guid DESC;", &handle->stmts.listConversationsCentered); } else if (start != -1) { stmt = SqlPrepare(handle,