Q:

sqlite3 query keeps failing to insert

I am trying to take the variable generated from cpu usage, but for some reason and no matter what I try the terminal returns a syntax error after getCpuLoad)) and also the sqlite3 query doesn't effect the table or database in question. 
def main():
      while True:
        print"CPU usage=%.2f%%" % (getCpuLoad()*100)
        cursor.execute("INSERT INTO mytable (Date, Cpu) VALUES (?,?)", ( today, getCpuLoad))
        time.sleep(INTERVAL)  
      conn.commit()
      conn.close()

can someone please help? 

A:

You are trying to insert the function, not it's result.  Call the function again:
cursor.execute("INSERT INTO mytable (Date, Cpu) VALUES (?,?)", ( today, getCpuLoad()))

If today is a function as well, you'd need to call that too of course.