Added SQL_CALC_FOUND_ROWS to handleQueryRequest fn