Chris Green <c...@isbd.net> writes:
>         self.conn = sqlite3.connect(dbname)
>         self.conn.row_factory = sqlite3.Row
>         self.cursor = self.conn.cursor()
>         self.table = table
>         ...
>         ...
>         sql = "SELECT * FROM " + self.table + " WHERE firstName||lastName = ?"
>         self.cursor.execute(sql, (name,))
>         row = self.cursor.fetchone()

untested:

with sqlite3.connect(dbname) as conn:
   sql = "SELECT * FROM " + self.table + " WHERE firstName||lastName = ?"
   cursor = conn.execute(sql, (name,))
   row = cursor.fetchone()
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to