What is the meaning of [never marry for money, but marry where money]

is It is good to marry somebody with sufficient means for a comfortable life,but wealth should not be your sole criterion in choosing a marriage partner