Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/225.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 游标为何丢失sqlite的排序描述_Android_Sqlite - Fatal编程技术网

Android 游标为何丢失sqlite的排序描述

Android 游标为何丢失sqlite的排序描述,android,sqlite,Android,Sqlite,我在sqlite中有一个查询 String[] args = { Report_DATETIME,Report_DATETIME, EMSUnitCode }; String sql = "Select * from TR_ReportingAll Where (Report_DATETIME<? or ( Report_DATETIME=? and EMSUnitCode!=?)) order by Report_DATETIME,EMSUnitCode DES

我在sqlite中有一个查询

String[] args = { Report_DATETIME,Report_DATETIME, EMSUnitCode };
            String sql = "Select * from TR_ReportingAll Where  (Report_DATETIME<? or ( Report_DATETIME=? and EMSUnitCode!=?)) order by Report_DATETIME,EMSUnitCode DESC Limit 10";
            mCursor = database.rawQuery(sql, args);
String[]args={Report\u DATETIME,Report\u DATETIME,EMSUnitCode};

String sql=“从TR_ReportingAll Where中选择*(Report_DATETIME您的排序标准是
Report_DATETIME ASC
,然后,所有具有相同Report_DATETIME的项目都按
EMSUnitCode DESC
进行排序
DESC
不适用于所有
ORDER by
字段,但只有您为其设置的字段和
ASC
才是默认顺序。因此,如果您要将日期降序,请将您的顺序更改为按报告日期时间描述的顺序,EMSUnitCode DESC

您的结果将首先按报告日期时间ASC
排序,然后按
EMSUnitCode DESC
第二次排序