know which side your bread is buttered (on) - definition and synonyms

phrase
  1. to know who to be nice to or what to do in order to gain advantages for yourself
See also main entry: bread