我是活跃的android的新手,我有一个名为MyTable的表,其中包含列articleName,articleId和imageTicket,我想将所有imageTicket列值存储在ArrayList中。有人可以帮我查询吗?
最佳答案
这是我的代码,从MyTable获取imageTicket列
private ArrayList<MyTable> myTableList = new ArrayList<MyTable>();
// to get all table data
myTableList = new Select().from(MyTable.class).execute();
for(int i = 0; i < myTableList.size(); i++){
String imageTicket = myTableList.get(i).getImageTicket();
// do something with imageticket value
}