I had problem about how to put AND condition in rawQuery . I want to getCount WHERE SQLiteHelper.product_FId =listId AND SQLiteHelper.product_Status==1 … Where should I add on another condition WHERE SQLiteHelper.product_Status==1 ?
public int getCountComplePro(String listId) {
// TODO Auto-generated method stub
String[] args = { listId };
int x = 0;
Cursor cur=database.rawQuery("SELECT * FROM "
+ SQLiteHelper.productTable + " WHERE "
+ SQLiteHelper.product_FId +"=?" ,args);
x=cur.getCount();
}
cur.close();
return x;
Hope anyone can guide me in this problem …
Shouldn’t this do it?