pysqlite2 fetching from select different than pysqlite?

S

schwehr

Hi All,

I have some old pysqlite 1.x code that uses a pattern like this:

cu.execute('SELECT weight FROM weights WHERE samplename="foo")
row = cu.fetchone()
weight=row['weight']

It seems like lookups by name are no longer supported in pysqlite2. Is
that true? And if not, and I want to do a SELECT * FROM table and go
through name by name, how can I do this?

Hopefully this is not a FAQ somewhere that I've overlooked!

Thanks!
-kurt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top