How to Know: Glasses are of Optical Quality?

I would like to save some money on frames for glasses this year--glasses that I desperately need!--and was wondering how to tell if a specific pair of glasses are of optical quality.

Here is what I would like to do: go to a dollar, thrift, or boutique store, purchase a pair of frames that look nice on my face, and have them filled with my prescriptive lens. How would I know if that pair of glasses will be able to hold a prescriptive lens?

Do I merely have to keep an eye open to the groove in the inner frame? Or is there more to it?

Most frames in thrift and drugstores are junk.
Rivets instead of screws, non adjustable nose pads, no spring hinges.
Go to optical store and ask to look at discontinued frames. Or order online by manufacture