Example 6 Let $P(x)$ be the product of the digits in the decimal representation of $x$. Try to find all positive integers $x$ such that
$$
P(x)=x^{2}-10 x-22
$$

holds.
Solution: Let $x=\overline{a_{n} a_{n-1} \cdots a_{1}}$.
When $n \geqslant 2$, according to (1) and (2), we have the estimate
$$
x \geqslant 10^{n-1} \cdot a_{n}>9^{n-1} \cdot a_{n} \geqslant P(x) \text {, }
$$

thus $x^{2}-10 x-22<x$.
Solving this, we get $0<x<13$.
Upon verification, $x=12$.