Let A be a real quadratic order of discriminant p or 4p with a prime p. In this paper we classify all proper totally imaginary quadratic A-orders B with index w(B) = [B × : A × ] > 1. We also calculate numerical invariants of these orders including the class number, the index w(B) and the numbers of local optimal embeddings of these orders into quaternion orders. These numerical invariants are useful for computing the class numbers of totally definite quaternion algebras.