Good afternoon, guys! Today I am making an insert that does not check if such a record has already been inserted into the database. Through the variables: name, date and number is a missing insert in the 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 this insert will only be done if the student's name is not already inserted and the date does not contain the date of the day. This date of the day I mean the date.today function
Thank you in advance for helping me!