一.总结昨天进度
1.昨天任务全部完成
二.遇到的问题
1.对数据库的使用陌生
2.使用sqlite有些困难
3.对如何解决查询课程问题暂时没有找到好的解决方案
三.今日任务
1.由于周一的课程比较紧凑,一天只有一节课的时间,所以只能简单学习一下数据库的知识
当日总结:
1.简单学习
Cursor cursor = database.rawQuery("select * from course", null); ArrayList<JavaBean> list=new ArrayList<JavaBean>(); if(cursor.moveToFirst()) { do{ String name=cursor.getString(cursor.getColumnIndex("name")); String teacher=cursor.getString(cursor.getColumnIndex("teacher")); double price=cursor.getDouble(cursor.getColumnIndex("price")); list.add(new JavaBean(name,teacher,price)); }while (cursor.moveToNext()); }