+# function to update an article
+def update_article (dbname, aid, title, summary, keywords, content, catid, stub, rating):
+ # modification time only to be updated
+ modtime = time.time ()
+ try:
+ conn = sqlite3.connect (dbname)
+ c = conn.cursor ()
+ c.execute ("UPDATE articles SET title=?, summary=?, keywords=?, content=?, mdate=?, cid=?, \
+ stub=?, rating=? WHERE aid=?;",
+ (title, summary, keywords, content, modtime, catid, stub, rating, aid))
+ conn.commit ()
+ conn.close ()
+ return True
+ except sqlite3.Error:
+ return False
+