append "where" and "having" with  "params" instead of replacing them.