Ryan Madson (2-0) got the win in relief of Hamels, who gave up two runs and 11 hits over seven innings.
Chad Tracy homered for the Diamondbacks in their third loss in five games.
Chad Qualls (2-7) took the loss, allowing four runs in one-third of an inning.
Couple mistakenly served bag of cash at McDonald's drive-thru
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need