pass $db when fetching table description