Pass db parameter to get function call