There's a lot of smugness on this thread I think.
I think it's just in the nature of kids - some will sit quietly in certain situations, some won't. I'm sorry, but I really don't think you can congratulate yourselves on clever parenting if you get a quiet one.
Several posters say they have one child who sits calmly and one who doesn't, which proves it's not down to parenting.
My kids will sit nicely for a while, long enough for the food to arrive if the service is good, but if it's a busy restaurant with long gaps between courses/drinks/bill etc, then they play up, and my 4 year old has been known to crawl under the table and generally mess around. What exactly do you expect a parent to do in those situations? Obviously the usual talking/persuading/negotiating/bribing/threatening is tried and fails.
I avoid non-child-friendly restaurants, but once you've already eaten part of a meal you can't just up and leave because your child is bored. Half the time I'm waiting for the bill anyway, so I am actually trying to leave! We rarely eat out, really only if we're away from home for a few days.
And I hate hate hate the looks some parents give, as they sit there smugly with their Stepford children happily colouring in the same picture they were given the last 20 times they went to Pizza Hut. Do you honestly think we want our kids to play up?
It's the luck of the draw. Be thankful.