The actual phrase is "When all you have is a hammer, everything looks like a nail."