public int getCount() {
  SQLiteDatabase db = dbOpenHelper.getReadableDatabase();
  Cursor cursor = db.rawQuery("select count(id) from table",null);
  cursor.moveToFirst();
  Long count = cursor.getInt(0);
  cursor.close();
  return count;
 }

 

相关文章:

  • 2022-12-23
  • 2022-02-15
  • 2022-12-23
  • 2021-10-17
  • 2021-07-02
  • 2021-11-25
  • 2021-10-06
  • 2021-12-17
猜你喜欢
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2022-02-12
相关资源
相似解决方案