Skip to content
Advertisement

How to search an sql lite database with python and print out the result in my ide?

I am trying to develop a method whereby it will allow the user to search by a chosen field and value eg. SELECT * FROM table WHERE column_field = ‘value’.

It executes just fine in SQL lite but when I bring it into my IDE nothing is printing out. Any advice much appreciated.

Advertisement

Answer

From sqlite doc keywords page

‘keyword’ A keyword in single quotes is a string literal.

Suggest not quoting {field} in the queries.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement