def insert_language_candidate(self,tweet):
        #lang TEXT, candidate_id INT, total INT
        keys = [tweet['lang'], 44101578, 1]
        try:
                cursor = self.con.cursor()
                cursor.execute("SELECT total from language_candidate WHERE ( lang='"+tweet['lang']+"' AND candidate_id ='"+str(44101578)+"')")
                node = cursor.fetchone()
                if node:
                    total = node[0]+1
                    cursor.execute("UPDATE language_candidate set total = "+str(total)+" WHERE  ( lang='"+tweet['lang']+"' AND candidate_id ='"+str(44101578)+"')")
                else:
                    cursor.execute("INSERT INTO language_candidate(lang,candidate_id,total) VALUES ('"+keys[0]+"','"+str(keys[1])+"','"+str(keys[2])+"')")
        except Exception, e:
            print "DB Error - language_candidate: ", e