Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- key = str(request.form['key'])
- key = "%"+key+"%"
- sql = "SELECT * FROM `products` WHERE `pName` LIKE %s"
- cursor = connection.cursor()
- cursor.execute(sql, (key))
- result = cursor.fetchall()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement