I want to add 1 to a counter that is represented as a string. the goal is to get the sequence of numbers later. For example: from 000570370 to 000570371.
part of the code:
def rangeOrdemServ(self):
db = self.conexaoBanco()
cursor = db.cursor()
cursor.execute("SELECT ordem_serv_num FROM ordem_serv ORDER BY id DESC LIMIT 1")
dadosOrdemServ = cursor.fetchone()
db.commit()
global rec
dados1 = [dadosOrdemServ]
dados2 = [1]
dados3 = (dados1) + (dados2)
self.entrOrdServ.insert(END,dados3)
When I run this code I get the following response:
[('000005703701021',), 1]
, not expected 000005703701022