下面我提到了我的代码。我想要字符串追加,但这不起作用。
public String fetchresturantID(String resturantID)
{
String query = "select "+resturantID+" From " + TABLErestaurant;
mCursor =db.rawQuery(query, null);
StringBuffer buf = new StringBuffer();
if (mCursor.moveToNext()) {
buf.append(mCursor.getString(0));
String str = buf.toString();
System.out.println("**************"+str);
}
return buf.toString();
}