How can I make a query sqlite
with where with two fields? Something similar to the following code:
select * from tabla where cap1=1 and cap2=2;
I know that I have to pass on to him, but I do not know how to assemble the whole query.
How can I make a query sqlite
with where with two fields? Something similar to the following code:
select * from tabla where cap1=1 and cap2=2;
I know that I have to pass on to him, but I do not know how to assemble the whole query.
On Android using SQLite you can use this form:
Cursor cursor = db.rawQuery("SELECT * FROM tabla WHERE cap1 = ? AND cap2= ?", new String[] {"1", "2"});
Using rawQuery , you define the Query and the selection arguments in an array of strings.
rawQuery(String sqlQuery, String[] selectionArgs)