aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjasper@unix.geek.nz <jasper@unix.geek.nz@767c508d-d83b-0410-8cff-fd39cd899a2f>2008-03-26 09:22:01 +0000
committerjasper@unix.geek.nz <jasper@unix.geek.nz@767c508d-d83b-0410-8cff-fd39cd899a2f>2008-03-26 09:22:01 +0000
commit9acda71d32c275b5460aa5469f8d246658db57a4 (patch)
treec2466237e1538d095f3ba4fd5218ca3770909388
parentc403dad79cd07ce51f76114c6a6d41ed8d012afa (diff)
downloadjuniper-browser-9acda71d32c275b5460aa5469f8d246658db57a4.tar.gz
juniper-browser-9acda71d32c275b5460aa5469f8d246658db57a4.tar.bz2
juniper-browser-9acda71d32c275b5460aa5469f8d246658db57a4.zip
use "insert or replace" to update history items which already exist
-rw-r--r--src/juniper-history.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/juniper-history.c b/src/juniper-history.c
index c35c974..505f064 100644
--- a/src/juniper-history.c
+++ b/src/juniper-history.c
@@ -31,7 +31,7 @@ gboolean juniper_history_add(const gchar * uri, const gchar * title)
printf("adding history item: uri=%s, title=%s\n", uri, title);
#endif
- sqlite3_prepare_v2(db_handle, "insert into history (uri, title, last_visited) values(?, ?, strftime('%s', 'now'))", -1, &statement, NULL);
+ sqlite3_prepare_v2(db_handle, "insert or replace into history (uri, title, last_visited) values(?, ?, strftime('%s', 'now'))", -1, &statement, NULL);
sqlite3_bind_text(statement, 1, uri, strlen(uri), SQLITE_STATIC);
sqlite3_bind_text(statement, 2, title, strlen(title), SQLITE_STATIC);