public void consultar() {
   AdminSQLiteOpenhelper admin =
       new AdminSQLiteOpenhelper(getApplicationContext(), "base", null, 1);
   SQLiteDatabase base = admin.getWritableDatabase();
   String query = "SELECT textFrase, audio,imagen FROM leasyC where idContenido = " + idRecibido;
   Cursor cursor = base.rawQuery(query, null);
   total = cursor.getCount();
 }
예제 #2
0
 public void consultar() {
   AdminSQLiteOpenhelper admin = new AdminSQLiteOpenhelper(this, "base", null, 1);
   SQLiteDatabase base = admin.getWritableDatabase();
   String query = "SELECT textFrase FROM leasyC where =" + idRecibido;
   Cursor cursor = base.rawQuery(query, null);
   arreglo = new String[cursor.getCount()];
   i = 0;
   while (cursor.moveToNext()) {
     arreglo[i] = cursor.getString(0);
     texto.setText(bundle.getString(arreglo[i]));
     i++;
   }
 }