For a fixed prime p and varying quadratic number fields $K = \mathbf Q (\sqrt D)$, it seems easier to look at the completions of K at the prime ideals of $O_K$ above p. Here p is required to split, say (p)=P.Q , with $P\neq Q$, so the local degrees $n_P, n_Q$ over $\mathbf Q_p$ must both be $1$. Equivalently, $K_P = K_Q = \mathbf Q_p$, and $D$ is a square in $\mathbf Q_p$. Using the well-known structure of $\mathbf Q_p ^*$ mod squares, this last condition means that : 1) If $p \neq 2$ and $D= p^n u$, where $u$ is a p-adic unit, then $n$ is even and the image of $u$ is a non null square in the residual field $\mathbf F_p$ ; 2) If $p=2$ and $D= 2^n u$, then $n$ is even and $u \equiv 1$ mod $8$ .