def showTask(): start.clearSn() newcursor = connectionMysql.getMysqlconnection() newcursor.execute("SELECT * from tasks order by priority desc limit 10 ") data = newcursor.fetchall() for tData in data: newStr = tData['task'].replace('\n', '') print(str(tData['priority'])+'\t'+newStr) print("\n") start.main()
def showThought(): start.clearSn() newcursor = connectionMysql.getMysqlconnection() newcursor.execute("SELECT * from thoughts order by rand() limit 10 ") data = newcursor.fetchall() for tData in data: newStr = tData['thought'].replace('\n', '') print(str(tData['id']) + '\t' + newStr) print("\n") start.main()
def writeThought(): start.clearSn() newcursor = connectionMysql.getMysqlconnection() x = raw_input("Enter your thought \n") t = datetime.now() unix_secs = mktime(t.timetuple()) unix_secs = int(unix_secs) query = "INSERT INTO thoughts(date, thought) values(" + str( unix_secs) + ",'" + x + "')" newcursor.execute(query) start.clearSn() start.main()
def writeTask(): start.clearSn() newcursor = connectionMysql.getMysqlconnection() x = input("Enter your Task \n") tp = input("Enter Task Priority \n") if tp=="": tp = 0 t = datetime.now() unix_secs = mktime(t.timetuple()) unix_secs = int(unix_secs) query = "INSERT INTO tasks(date, task,priority) values("+str(unix_secs)+",'"+x+"',"+str(tp)+")" newcursor.execute(query) start.clearSn() start.main()
def writeReminder(): start.clearSn() newcursor = connectionMysql.getMysqlconnection() x = raw_input("Enter your Reminder \n") tp = raw_input("Enter Reminder Priority \n") if tp=="": tp = 0 t = datetime.now() unix_secs = mktime(t.timetuple()) unix_secs = int(unix_secs) query = "INSERT INTO reminders (date, reminder,priority) values("+str(unix_secs)+",'"+x+"',"+str(tp)+")" newcursor.execute(query) start.clearSn() start.main()