Set a variable for the limit of total matches count. Adjust total match count to limit to provide proper $start value calculation. Adjust $start value if no matches were found. PHPBB3-10532