id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
4243	SQL for sqlite3	flambeau	ChrisNelson	I've got the TeamCalendarPlugin to work with sqlite3 by changing just one function. I don't use MySQL so I'm not sure if this will work with that too.       \r\n\r\n{{{\r\ndef update_timetable(self, tuples):\r\n    db = self.env.get_db_cnx()\r\n    cursor = db.cursor()\r\n    for t in tuples:\r\n      sql = "SELECT * FROM %s WHERE username='%s' AND ondate='%s'" % (self.table_name, t[1], t[0])\r\n      cursor.execute(sql)\r\n      if cursor.fetchone():\r\n        sql = "UPDATE %s SET availability=%d WHERE username='%s' AND ondate='%s'" % (self.table_name, t[2], t[1], t[0])\r\n        cursor.execute(sql)\r\n      else:\r\n        sql = "INSERT INTO %s (ondate, username, availability) VALUES ('%s', '%s', %d)" % (self.table_name, t[0], t[1], t[2])\r\n        cursor.execute(sql)\r\n    db.commit()\r\n}}}	enhancement	closed	normal	TeamCalendarPlugin	normal	fixed	sql calendar	r.rossmair@ollendorf.biz	0.11
