I want to search using the "clas" field, which is a String. And listSearch receives a String.
public Cursor listPesquisar(String pesquisa) {
Cursor cursor;
String[] fields = new String[]{"_id", "nome", "peso", "altura", "cep", "telefone", "idade", "resultado", "clas"};
String where = "clas =" + pesquisa;
db = banco.getReadableDatabase();
cursor = db.query(DadosDB.NOME_TABELA, fields, where,null, null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
db.close();
return cursor;
}