The error message talks about the format parameters, with argument 2 to map() needing to support iteration.Hmm, you had thought that because you were only passing one arg, you should pass it 'naked' and not in a tuple. Clearly that was wrong. So you write:

and you get the same error message. OK, that can't have been it, so you faff about a bit more. And that's where you went wrong. Funnily enough, I was stuck until I found the answer here in the MySQLdb User's Guide. (And yes, I really do mean MySQLdb and not MySQL's own connector.)Here's the version that works:

To sum up, you need to insert your single value in a tuple with a second empty item, to prevent Python from treating the brackets around dassieId as ordinary grouping brackets and thus mentally undressing it.Ugly, and I'm sure there's a nicer way of writing it (perhaps by creating an instance of some tuple class), but right now all I want to do is lie down in a darkened room...