I think you'll find better advice for this in F11. Having said that, Chiang Mai is much cheaper than most places, both for accommodation and training, with BKK being the most expensive but also having the highest level of fights and training available.
Online prices vs prices paid in person may differ at some gyms, but generally the longer you stay the cheaper it will be. I would suggest getting in contact with the gyms by email or phone (if you have someone who speaks Thai then that makes it a lot easier).
Usually you'll find it cheaper to stay off camp at a short-term apartment rather than at the gym. Personally, I'd rather live at the gym, but that's just because if I'm there to train, I may as well put myself in the position where I can get the most from it and where I'd be least likely to slack off. It's different for everyone though.
If you're in Chiang Mai, I'd recommend stopping by Chay Yai gym. The owner, Chelsea, did a stint here in NZ as a trainer, so his English is pretty good, and the camp has a fair number of farang come through while still having some more serious fighters based there (like Perg).