MySql cursors.execute() with only one parameter: Why is a string sliced into a list?
问题 Status Quo: I have a working database with tables and can query, insert, update, etc. Also the cursor is connected to the right database. The table: Problem: When it comes to querying data from a table I run into trouble: query = 'SELECT Last_Request_Time FROM Products WHERE idProduct = %s' idProduct = '106' cursor.execute(query, (idProduct)) While debugging I have a look at the cursor.execute() function: params = str: 106 will be passed to: stmt = operation % self._process_params(params)