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
