made some security updates in the database->pdo function