i trying to data ordered column not working. idea on why?
public arraylist<hashmap<string, string>> getmonthdata(string month,string year, string name){ arraylist<hashmap<string,string>> activityarraylist = new arraylist<hashmap<string,string>>(); string selectquery = "select * activity year='"+year+"' , month='"+month+"' , name=? order day asc"; sqlitedatabase database = this.getwritabledatabase(); cursor cursor = database.rawquery(selectquery,new string[] { name }); if(cursor.movetofirst()){ do{ hashmap<string, string> activitymap = new hashmap<string,string>(); activitymap.put("day",cursor.getstring(2).tostring()); activityarraylist.add(activitymap); }while(cursor.movetonext()); } return activityarraylist; }
the solution stored day text order lexicographical. have cast real. using "cast(day real)".