From 86846c2fe694f09b8d79d330968283c3a5cdf4d5 Mon Sep 17 00:00:00 2001 From: me_desk Date: Mon, 14 Oct 2013 16:14:16 +0000 Subject: fixed database update query git-svn-id: svn://localhost/project_picapica/trunk@285 fb96df88-216d-11de-830c-f3023f12d8ac --- pica-client/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pica-client/main.cpp b/pica-client/main.cpp index e58afcf..cf51541 100644 --- a/pica-client/main.cpp +++ b/pica-client/main.cpp @@ -347,7 +347,7 @@ static bool update_database() goto showerror; query.exec("insert into history select h.id, c.new_id, a.new_id, h.timestamp, h.is_me, h.is_delivered, h.message \ - from history_old_schemav1 as h, accounts_old_schemav1 as a, contacts_old_schemav1 as c on h.contact_id = c.id and h.account_id = a.id and a.id = c.account_id order by h.id"); + from history_old_schemav1 as h, accounts_old_schemav1 as a, contacts_old_schemav1 as c on h.contact_id = c.id and h.account_id = a.id and a.id = c.account_id order by h.id where c.new_id is not null and a.new_id is not null"); if (query.lastError().isValid()) goto showerror; -- cgit v1.2.1