Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. key = str(request.form['key'])
  2. key = "%"+key+"%"
  3. sql = "SELECT * FROM `products` WHERE `pName` LIKE %s"
  4. cursor = connection.cursor()
  5. cursor.execute(sql, (key))
  6. result = cursor.fetchall()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement