I can't work out what the problem here is. The error code I keep getting is "Wrong number of arguments during string formatting" however I'm personally not seeing anything wrong with it. Can anyone point me in the right direction? Thanks.
def film_function(number, film):
connection = connect(host='localhost', user='root', \
passwd='', db='survey')
cursor = connection.cursor()
sql = "SELECT * FROM persons, persons_films WHERE persons.person = persons_films.person AND number_of_films >= %s AND film = '%s' ORDER BY persons_films.person"
cursor.execute(sql, [number], [film])
rows = cursor.fetchall()
if not rows:
print ("No one in "+film+" found!")
else:
for row in rows:
print row[0],"-", row[1]
cursor.close()
connection.close()