converting mysql connections to PDO and converting to OOP