Flank pain can be either due to stone or due to muscle pulling. Are you also having burning during pee or fever. If any one of these symptoms present take plenty of water, fruit juice. If nothing is positive than get x ray of spine done. If it showsmuscle spasm than take muscle relaxa like myoril.