7 lines
261 B
Python
7 lines
261 B
Python
|
global getMessageId
|
||
|
def getMessageId():
|
||
|
messageId = dbGet(p(sp,"server.db"),"MESSAGES","messageId")
|
||
|
if messageId == False: messageId = "-1"
|
||
|
messageId = str(int(messageId) + 1)
|
||
|
dbSet(p(sp,"server.db"),"MESSAGES","messageId",messageId)
|
||
|
return messageId
|