I am trying to call a sql script using python as below:
def employees(email_address):
cursor = conn.cursor() . <- DB Connection
cursor.execute("""select name from employees where email_address =(%s)""", (email_address))
employee = cursor.fetchall()
This returns an error
TypeError: not all arguments converted during string formatting
Could anyone advice as to where am I going wrong in the above. Thanks
email_address = %(email_address)s, and use{'email_address': email_address}as the second parameter.