Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

sqlite query using string as parameter in python

import sqlite3

conector = sqlite3.connect("database.db")
cursor = conector.cursor()
string = "Some interesting stuff"
cursor.execute("SELECT * FROM table WHERE item = ?", [string])
Comment

PREVIOUS NEXT
Code Example
Python :: how to create a subset of two columns in a dataframe 
Python :: add a constant to a list python 
Python :: adding new key in python 
Python :: python print set 
Python :: code example of sum of the first n odd numbers using for loop 
Python :: for loop in range 
Python :: python tutorial 
Python :: remove figure label 
Python :: xlrd documentation 
Python :: variable globale python 
Python :: python loop 
Python :: python gui framework 
Python :: init array in numpy 
Python :: name is not defined python 
Python :: Python NumPy delete Function Syntax 
Python :: implement stack using list in python 
Python :: dependency injection python 
Python :: How to delete a file or folder in Python? 
Python :: attributes in python 
Python :: python sleep command 
Python :: re.sub 
Python :: 3d array 
Python :: is there a null data type in python 
Python :: ++ in python 
Python :: how to split a string by colon in python 
Python :: what does the .item() do in python 
Python :: pandas replace values from another dataframe 
Python :: UserWarning: X does not have valid feature names, but LinearRegression was fitted with feature names 
Python :: python remove the element in list 
Python :: Dynamic Form Fields Django 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =