Mar-20-2017, 08:45 PM
.close is a method. You need parenthases to call it.
And please, don't write sql queries like that. Use the string formatting the db engine provides, so the values are escaped properly (otherwise a "well written" text snippet could "accidentally" delete your entire database). So maybe
c.close()
and conn.close()
.And please, don't write sql queries like that. Use the string formatting the db engine provides, so the values are escaped properly (otherwise a "well written" text snippet could "accidentally" delete your entire database). So maybe
user = "%{}%".format(name) c.execute("select users from results where users like ?", user)