Update DBHandler.php

updated, made it more dynamic