changed query algorithm for 3 table page/request manager web page