【发布时间】:2018-06-14 11:42:29
【问题描述】:
public String readQuestion(int i)//Used to read the data from the Des.db file where id is given and we choose id randomly
{
String Ans = "";//string that contains the required field note that Ans is just a local string not related to Answer or Option...
Cursor c = sqlite.rawQuery("SELECT " + Question + " FROM " + Table_name + " LIMIT " + 5 + " WHERE " + uid + " = " + i + "", null);//cursor to that query
if (c.moveToFirst())
Ans = c.getString(0);
else
Ans = "";
return Ans;
}
我想在这个查询中添加一个限制。像 LIMIT 10。
【问题讨论】:
-
请不要编辑您的旧问题来提出一个全新的问题,因为以前的答案无效!相反,欢迎您提出new question,这将吸引新的答案