Not sure if this is exactly what you are looking for, but here is an example showing one way to add numbering to your previous solution. This involves using the user environment "myequation" instead of the environment "equation":
\documentclass{article}
\newtheorem{theorem}[subsection]{Theorem}
\newenvironment{myequation}
{\setcounter{equation}{\value{subsection}}\begin{equation}}
{\stepcounter{subsection}\end{equation}}
\renewcommand{\theequation}{\mbox{\arabic{section}.\arabic{equation}}}
\begin{document}
\section{My Section}
\subsection{A subsection}
\begin{theorem}adfadfadf
\end{theorem}
\begin{myequation}abcdefg
\end{myequation}
\begin{myequation}abcdefg
\end{myequation}
\subsection{A subsection}
\begin{theorem}adfadfadf
\end{theorem}
\begin{theorem}adfadfadf
\end{theorem}
\begin{myequation}abcdefg
\end{myequation}
\end{document}
source
share