Background
I have a set of tables that can be automatically generated (specifically, a set of database table descriptions generated by phpmyadmin).
I would like to include each tables in the document after it is mentioned.
I think that I understand how the table placement commands work [htbp], but these are not the issue.
Question
Is there a simple way to force float placement after a reference?
Examples
This is a MWE of what I have
\documentclass[10pt]{article}
\usepackage{hyperref}
\begin{document}
\input{dbtables.tex}
% in practice, all tables appear here
\section{tables}
\subsection{table1}
\autoref{tab:table1} is for this.
% I want Table 1 to appear here
\subsection{table2}
\autoref{tab:table2} is for that.
% I want Table 2 to appear here
\end{document}
Where the contents of dbtables.tex might be
\begin{table}[hb]
\caption{test table 1}
\label{tab:table1}
\begin{tabular}{ l c r }
1 & 2 & 3 \\
\end{tabular}
\end{table}
\begin{table}[hb]
\caption{test table 2}
\label{tab:table2}
\begin{tabular}{ l c r }
4 & 5 & 6 \\
\end{tabular}
\end{table}
In the end, the result that I want would be similar to:
\documentclass[10pt]{article}
\usepackage{hyperref}
\begin{document}
\input{dbtables.tex}
\section{tables}
\subsection{table1}
\autoref{tab:table1} is for this.
\begin{table}[hb]
\caption{test table 1}
\label{tab:table1}
\begin{tabular}{ l c r }
1 & 2 & 3 \\
\end{tabular}
\end{table}
\subsection{table2}
\autoref{tab:table2} is for that.
\begin{table}[hb]
\caption{test table 2}
\label{tab:table2}
\begin{tabular}{ l c r }
4 & 5 & 6 \\
\end{tabular}
\end{table}
\end{document}
Except that I want to keep the files separate.