왜 흐르는 쿼리가 제대로 작동하지 않는지 알 수 없습니까? 그것은 같은 이름의 다른 _ID (키)와 유형이있는 경우 true를 반환하는 가정SQLite 쿼리가 작동하지 않습니다.
//****************************************************************************************************//
// ifExistButMy(String typeName,int ID) FUNCTION: return true if type name exists but mine(ID)
//
//****************************************************************************************************//
public boolean ifExistButMy(String typeName,int ID){
Cursor cur;
SQLiteDatabase db = content.getWritableDatabase();
cur = db.query(TABLE_NAME, null,TYPE_NAME + "='" + typeName + "'"+" AND "+ _ID+ " <> " + ID,null, null, null, null);
return cur.moveToFirst(); //returns false if cur is empty
}
뭐죠의 값 _ID 선택할 수있는 필드 필요없이 널 ? – DallinDyer