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.
def update_timetable(self, tuples):
db = self.env.get_db_cnx()
cursor = db.cursor()
for t in tuples:
sql = "SELECT * FROM %s WHERE username='%s' AND ondate='%s'" % (self.table_name, t[1], t[0])
cursor.execute(sql)
if cursor.fetchone():
sql = "UPDATE %s SET availability=%d WHERE username='%s' AND ondate='%s'" % (self.table_name, t[2], t[1], t[0])
cursor.execute(sql)
else:
sql = "INSERT INTO %s (ondate, username, availability) VALUES ('%s', '%s', %d)" % (self.table_name, t[0], t[1], t[2])
cursor.execute(sql)
db.commit()