In Codex I found that the best action to call add_rewrite_rule is the init action. So in this way the function is called every time the site load. But to save the rule in rewrite_rules option it would be better to call it in register_activation_hook?


Question: how to retrieve data from database correctly in java
Answer: You change query to get all maximum salary persons in single query

PreparedStatement st = con.prepareStatement("
select fName, lName, salary from task4Table where salary = 
(select max(salary) from task4Table)");
ResultSet r1 = st.executeQuery();


Iterate this resultset.