apie / birthdaymailer

Send e-mails on birthdays

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use parameters in SQL instead of string formatting

apie opened this issue · comments

# Use all the SQL you like
query="SELECT config_id, config_name, from_name, from_address, bcc_address, topic, line1, age_line, noage_line, picture_file "\
"FROM config "\
"WHERE config_id='%d'" % (config_id)
cur.execute(query)

https://docs.python.org/3/library/sqlite3.html#sqlite3.Cursor.execute