我正在尝试将许多参数传递给 Android 中的查询。我正在做的是以下内容:
String final QUERY = "SELECT TA.ID FROM TAB TA LEFT JOIN PROP P ON P.ID = TA.ID LEFT JOIN LOC L ON L.ID = TA.ID LEFT JOIN TIME T ON T.ID = TA.ID WHERE (COALESCE(LONG,?) - ?) * (COALESCE(LONG,?) - ?) + (COALESCE(LAT,?) - ?) * (COALESCE(LAT,?) - ?) <=COALESCE(VALUE,0)*COALESCE(VALUE,0) AND ? BETWEEN COALESCE(BEGIN,0) AND COALESCE(END, 123456)";
String[] args= {"" + val1, "" + val2, "" + val3, "" + val4, "" + val5, "" val6, "" + val7, "" + val8, "" + val9}
cursor = db.rawQuery(QUERY,args);
但它返回一个空游标。请问有什么帮助吗?谢谢你。