samedi 28 février 2015

How to execute select query in sqlite by android

I have write this code for select filtered data from sqlite db through android. But it says there are some error. Can you help me to correct my code please.



category = data[0];
district = data[1];

SQLiteDatabase db = openOrCreateDatabase("dbumbers", 1, null);

Cursor c = db.rawQuery("SELECT * FROM numbers where [category = '"+category+"'] and [district = '"+district+"']", null);

Aucun commentaire:

Enregistrer un commentaire