Does anyone know how to make this work, I’ve never tried it so I’m not sure where to start really. The calling code is happy to send two parameters but the query is not happy and wants me to remove + ” AND BeachFK=?”, args2
public String getFacilityDetail(String F_ID, String B_ID) {
String[] args1 = {F_ID};
String[] args2 = {B_ID};
Cursor c = getReadableDatabase().rawQuery("SELECT FacilityDescription FROM BeachFacility WHERE FacilityFK=?", args1 + " AND BeachFK=?", args2);
if(c.moveToNext()){
return(c.getString(c.getColumnIndex("FacilityDescription")));
}
c.close();
return F_ID;
}
Any help will be greatly appreciated!
Cheers,
Mike.
You have two ways:
or: