Query Like in SQLite Android

0

I'm trying to make a query like in sqlite.

Cursor cursor = database.rawQuery("SELECT nome FROM Armas WHERE nome LIKE ?", new String[]{name});

This String I go like this:

 data = getIntent().getStringExtra("name");
        final List<String> getFinalResult = databaseAccess.pesquisaArmas("%" + data + "%");

But it is not returning with like, it is returning all the records. What is the way to return only what was passed in the variable data?

    
asked by anonymous 23.02.2017 / 18:01

0 answers