Created
December 13, 2018 18:54
-
-
Save parzibyte/91d852153c567cba3f011ea8a7b95978 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$baseDeDatos = obtenerBaseDeDatos(); | |
$coleccion = $baseDeDatos->contactos; | |
$resultado = $coleccion->deleteOne( | |
// El criterio, algo así como where | |
["_id" => new MongoDB\BSON\ObjectId($id)] | |
); | |
$eliminados = $resultado->getDeletedCount(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment