#!/usr/bin/env python

import MySQLdb
#import datetime
#import urllib2
#import os
  
servername = "localhost"
username = "pi"
password = "password"
dbname = "pi_heating_db"

cnx = MySQLdb.connect(host=servername, user=username, passwd=password, db=dbname)
cursorread = cnx.cursor()

query = ("UPDATE `timers` set value = value -1 WHERE value >0")
cursorupdate.execute(query)

cursorupdate.close()
cnx.commit()
cnx.close()

@@ -259,12 +259,14 @@
 rsor
-read
+update
  = c
@@ -321,17 +321,16 @@
  = value
- 
 -1 WHERE
@@ -341,9 +341,11 @@
 ue %3E
-0
+ 0;
 %22)%0Ac

Update update-timers.py