Pain from coughing

Excessive coughing led to stomach pain assuming from straining muscles. It improved but went from whole tummy hurting to just the left side whenever I cough.

Anyone had this?