updated database and sqlquery classes to fully take advantage of PDO integration