|
@@ -621,7 +621,13 @@ public class TodayHanjaDAO {
|
|
|
try {
|
|
|
// DB connetion
|
|
|
mDb = dbutl.connetion();
|
|
|
- String sql = "select count(1) as cnt from study_content where study_date is not null";
|
|
|
+ String sql = "select count(1) as cnt from study_content where study_date is not null \n";
|
|
|
+ sql += "and grade in ";
|
|
|
+ sql += "(";
|
|
|
+ sql += "select case value when 'Y' then 'M' else null end as grade from study_config where keys = 'middleGrade' \n";
|
|
|
+ sql += "union all \n" ;
|
|
|
+ sql += "select case value when 'Y' then 'H' else null end as grade from study_config where keys = 'highGrade' ";
|
|
|
+ sql += ")";
|
|
|
|
|
|
Log.d(TAG, "selectSql >>> " + sql);
|
|
|
|