Mishap in replacing supply valve under sink
I was replacing the supply valves under my new bathroom sink as the old ones had old fashioned metal connectors that wouldn't work.
The old supply valves had a soldered on metal pipe right behind the knob, and I now realize (too late) that that was what I needed to unscrew (probably by cutting off the metal supply line to allow it to rotate). Instead, I turned a larger nut behind that, and directly in front of the flange against the wall. This turned seemingly forever, and once I realized it wasn't coming off (but was somehow coming out from the wall) I noticed that the pipe behind it seemed to have no threads. I started to get nervous that perhaps I was unscrewing a pipe deep inside the wall, so I started to turn the nut back in a clockwise direction (again, seemingly forever) but it never went back towards the edge of the flange.
Eventually I started to get a drip from this nut (just slight as the water for the house was turned off), and I found that at a particular position, this was minimized. A little bit clockwise and the leak became really bad, and the same if I went counter-clockwise.
I now have the water for the house back on, and a slow drip from this nut. I'm pretty nervous that something will give way, and I'll have a flood on my hands.
What have I done, and how can it be repaired?
Sorry this was so long, and hopefully, my description was clear- it's hard to describe without a diagram, but I'm wondering if I'll need to call in a professional to solder this fitting or what.
Thanks so much for any help that can be offered!
Andy