Squash vine borer
I have planted zucchini. The plants looked healthy but now the leaves are suddenly starting to wilt in the sun. I also noticed some mushy, yellowish, grainy stuff at the base of the plant and some of the fruit stopped growing and is starting to rot.
You may be the victim of squash vine borer which not only attacks zucchini but pumpkins and other types of squash. This moth with metallic green wings will lay is dull red eggs on the base of the main stem or underside of leaves. When the eggs hatch, the larva bores inside the stem and feeds on the vine until it collapses.
It is a difficult pest to control but here are some ideas to help fight the battle.
You can spray the base of the plant with rotenone, pyrethrins or BTK to kill the larvae before they enter the vines. Cover the plants with floating row cover early in the season or wrap the the lower 6″ of the plant with panty hose or tin foil to keep the moths from laying eggs. The problem is as the season progresses and the vines get longer the larvae enter at other sections of the vine. You can try to save infested vines by cutting the vine and digging out the borer with a knife then heaping soil over the cut portion to induce rooting. Injecting BTK into the vine is also worth a try.
If you delay you planting time you may be able to side step the moth laying schedule. Be sure to rotate your plantings each year.