//final Cursor cursor = db.query ("products", null, "id = 3", null, null, null, null);
final Cursor cursor = db.query ("products", null, "id = ?", new String[] { Integer.toString(idNumber) }, null, null, null);
cardView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onClick(product.getId());
}
}
});
int idNumber = (Integer)getIntent().getExtras().get(EXTRA_PRODUCT);
SQLiteDatabase db = dbHelper.getReadableDatabase();
final Cursor cursor = db.query ("products", null, "id = ?", new String[] { EXTRA_PRODUCT }, null, null, null);