0
Good afternoon, you guys! Today I am making an Internet that does not check if such record has already been entered in the database. Through the variables: name, date and number an Index is performed in the missing table:
nome = message.who_name
numero = message.who
data = date.today()
sql = "insert into faltantes values ('', %s, %s, %s)
valores = (nome, numero, data)
cursor.execute(sql, valores)
I would like to know if you can help me, so that this Internet will only be held if the student’s name is not already entered and the date does not contain the date of the day. That date of day I refer to the date.Oday function
I appreciate anyone who can help me!
You know the clause
unique
of SQL?– Woss