I was always told that if your ears hurt then you have blocked sinuses. I usually find Sudafed is very good for this or Otrivine nasal spray.
Be very careful flying with a heavy cold though, I once flew a 2 sector day with a heavy cold, nearly burst my eardrums and was signed off for a week.
Now if i have a bad cold, i wont fly as i aint risky it