mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-14 20:47:54 +01:00
add studyListLangCount()
This commit is contained in:
parent
aab876bf6d
commit
9d19bed3b7
1 changed files with 20 additions and 0 deletions
|
@ -1580,6 +1580,26 @@ public class DBUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int studyListLangCount( Context context )
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
String groupBy = DBHelper.LANGUAGE;
|
||||||
|
String selection = null;//DBHelper.LANGUAGE;
|
||||||
|
String[] columns = { DBHelper.LANGUAGE };
|
||||||
|
|
||||||
|
initDB( context );
|
||||||
|
synchronized( s_dbHelper ) {
|
||||||
|
SQLiteDatabase db = s_dbHelper.getReadableDatabase();
|
||||||
|
Cursor cursor = db.query( DBHelper.TABLE_NAME_STUDYLIST, columns,
|
||||||
|
selection, null, groupBy, null, null );
|
||||||
|
result = cursor.getCount();
|
||||||
|
cursor.close();
|
||||||
|
db.close();
|
||||||
|
}
|
||||||
|
DbgUtils.logf( "studyListLangCount() => %d", result );
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private static void copyGameDB( Context context, boolean toSDCard )
|
private static void copyGameDB( Context context, boolean toSDCard )
|
||||||
{
|
{
|
||||||
String name = DBHelper.getDBName();
|
String name = DBHelper.getDBName();
|
||||||
|
|
Loading…
Add table
Reference in a new issue