I am using PyMySQL with Python to access my database. (MySQLdb is not yet available for newer releases of Python.)
This is my query:
cur = db.cursor()
cur.execute("SELECT ingredientID FROM Ingredients WHERE ingredientName = %s", "onions")
However, instead of returning the ingredientID
, a boolean is returned stating the recipe was found. I have worked with MySQL(i) in PHP and have not had this issue occur in the past.