samedi 24 octobre 2015

Selecet Where And Where Command in SQLite DataBase(Android)

This code works :

     Cursor cursor=database.rawQuery("SELECT * FROM "+dbHelper.TABLE_NAME+" where `" +
            dbHelper.MyShifts_Month + "`=" + month ,null);

And this doesn't :

 Cursor cursor=database.rawQuery("SELECT * FROM "+dbHelper.TABLE_NAME+" where `" +
            dbHelper.MyShifts_Month + "`=" + month + " and " + dbHelper.MyShifts_year + "`=" + year,null);

How Should I wirte the "AND" correctly in order to make it work ? Thanks!

Aucun commentaire:

Enregistrer un commentaire