|
楼主 |
发表于 2016-7-8 16:14:37
|
显示全部楼层
本帖最后由 tlkj 于 2016-7-8 16:18 编辑
怎么赋值给row中的列啊?您看下我应该在哪做这个赋值操作,能否用代码的提示一下?谢谢!
public static Table show() throws ParseException, SQLException {
String sql = "select uploadAddr from pic";
HashMap<String, String> sqlMap = new HashMap<String, String>();
sqlMap.put(SQL.DEFAULT_DB_NAME, sql);
Table table = SQL.select(sqlMap, null, "/qx/qx/data");
String uploadAddr = "";
Iterator<Row> addrRows = table.iterator();
JSONObject j = new JSONObject();
String m = "";
while (addrRows.hasNext()) {
Row addrRow = addrRows.next();
uploadAddr = (String) addrRow.getValue("uploadAddr");
m += uploadAddr + ",";
}
m = m.substring(0, m.length() - 1);
String n = m.replace("[", "");
String d = n.replace("]", "");
String newJson = "[" + d + "]";
return table;
}
|
|