Created
February 4, 2019 16:20
-
-
Save parzibyte/cb5a16c5ce8cc26e48dcb11f75350578 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
public long nuevaMascota(Mascota mascota) { | |
// writable porque vamos a insertar | |
SQLiteDatabase baseDeDatos = ayudanteBaseDeDatos.getWritableDatabase(); | |
ContentValues valoresParaInsertar = new ContentValues(); | |
valoresParaInsertar.put("nombre", mascota.getNombre()); | |
valoresParaInsertar.put("edad", mascota.getEdad()); | |
return baseDeDatos.insert(NOMBRE_TABLA, null, valoresParaInsertar); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment