One should avoid consumption of any painkillers with stomach ulcers. However, one should consult a doctor before taking any medicines.