Change database connection from MySQLi to PDO