Having had injuries and taken anti-inflamatories that worked, I can tell you that:
-As someone mentioned, you should first heal up while taking them, then ease back in to the problem exercises. The last resort if they don't work is cortisone, which if used sparingly is incredibly effective.
-The pain was a warning that you're doing things the body doesn't agree with, repetitive use trauma that will likely return eventually. Therefore:
-Warm up well
-Do another exercise for the muscle first, to warm up the area further.
-Keep the reps at 10-15, no lower
-Often the problems are barbell related-bench press, curls, military presses-go instead with dumbbells and avoid barbells altogether. Once you're used to dumbbells you realize that they're in fact better re: development and allow natural motions that doesn't aggrevate joints and wrists.