Skip to content

Instantly share code, notes, and snippets.

@yelinaung
Created November 18, 2013 04:42
Show Gist options
  • Save yelinaung/7522666 to your computer and use it in GitHub Desktop.
Save yelinaung/7522666 to your computer and use it in GitHub Desktop.
Get Talk Status
public boolean getTalkStatus(String tID) {
Cursor fav = mDb.rawQuery(
("SELECT " + DBHelper.tFAV + " FROM " + DBHelper.TABLE_TALK
+ " WHERE " + DBHelper.tID + " = " + tID), null);
// it makes me half my of day gone
fav.moveToFirst();
if (fav.getCount() > 0) {
do {
if (fav.getInt(0) == 0) {
status = false;
} else if (fav.getInt(0) == 1) {
status = true;
}
LogUtil.LOGD(TAG, "and value: " + fav.getInt(0));
} while (fav.moveToNext());
}
return status;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment