Re: How to iterate through the columns in a row using sqlite3.Row

2017-03-13 Thread Peter Otten
Chris Green wrote: > MRAB wrote: >> On 2017-03-12 22:44, Chris Green wrote: >> > This should be simple but I can't manage it at the moment! :-) >> > >> > I have opened a database connection and have set the row_factory to >> > sqlite3.Row. >> > >> > So how do I actually iterate through a row of

Re: How to iterate through the columns in a row using sqlite3.Row

2017-03-13 Thread Chris Green
Paul Rubin wrote: > Chris Green 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 + " W

Re: How to iterate through the columns in a row using sqlite3.Row

2017-03-13 Thread Chris Green
MRAB wrote: > On 2017-03-12 22:44, Chris Green wrote: > > This should be simple but I can't manage it at the moment! :-) > > > > I have opened a database connection and have set the row_factory to > > sqlite3.Row. > > > > So how do I actually iterate through a row of data having used > > fetchone

Re: How to iterate through the columns in a row using sqlite3.Row

2017-03-12 Thread Paul Rubin
Chris Green 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 = ?" >

Re: How to iterate through the columns in a row using sqlite3.Row

2017-03-12 Thread MRAB
On 2017-03-12 22:44, Chris Green wrote: This should be simple but I can't manage it at the moment! :-) I have opened a database connection and have set the row_factory to sqlite3.Row. So how do I actually iterate through a row of data having used fetchone to read a row. I.e. I have:-

How to iterate through the columns in a row using sqlite3.Row

2017-03-12 Thread Chris Green
This should be simple but I can't manage it at the moment! :-) I have opened a database connection and have set the row_factory to sqlite3.Row. So how do I actually iterate through a row of data having used fetchone to read a row. I.e. I have:- self.conn = sqlite3.connect(dbname)