like in mysqldb python

41

like in mysqldb python -

# you can't have '%' directly onto the query, you have to pass it as args
c.execute("SELECT * FROM data WHERE params LIKE %s LIMIT 1", ("%" + param + "%",))

Comments

Submit
0 Comments