We were skeptical of this and seeing as my 13 year old son likes experiments, we tried it.
We mixed 3 cups of water, 1/2 cup of vinegar and 1/4 cup white sugar in a 2 pound deli container, punched fly sized holes in the lids and put it where we had fly problems. I say HAD because the flies love this mixture, as do the gnats, and in no time the container was filling with little floating fly bodies.
SO you might give this a try, in smaller proportions near your flower pots.