Going with your friend who's an insider, makes all the difference, obviously! Not your first time going to exotic countries, you know already to bring some Cipro and other meds to help your system handle the food there, my Vietnamese friend says he has to adjust every time he visits...
I think you're better off eating from street corner food stands than proper restaurants. They cook stuff on the spot, no time for it to go bad. Restaurants, you have no idea what's going on in the kitchen.
At least that's what my uncle says. He has a house in rural Thailand. They never eat for over a dollar.