I believe that the placeholder for parameterised queries in MySQL is %s
, not ?
. That’s what it is in SQLite.
cursor.execute(" select * from r_bapteme where numero_bapteme like %s", ('%' + num_bapteme + '%',))
Also, the fetchall
is missing its parentheses:
results = cursor.fetchall()