java程序操作MySQL数据库
2012-12-08 15:43:06 来源:WEB开发网核心提示:manage mr = new manage();// mr.delete_people("001");删除uid=001的学生信息people[] people_array;// 声明对象数组people_array = mr.query_people_byscore(100);// 返回成绩为一
manage mr = new manage();
// mr.delete_people("001");删除uid=001的学生信息
people[] people_array;// 声明对象数组
people_array = mr.query_people_byscore(100);// 返回成绩为一百的学生类数组,后输出
int num = 0;
num = people_array.length;
for (int i = 0; i < num; i++) {
System.out.println(people_array[i].getUid() + " "
+ people_array[i].getName() + " "
+ people_array[i].getBanji() + " "
+ people_array[i].getScore());
people_array = mr.query_people_byscore(100);// 返回成绩为一百的学生类数组,后输出
int num = 0;
num = people_array.length;
for (int i = 0; i < num; i++) {
System.out.println(people_array[i].getUid() + " "
+ people_array[i].getName() + " "
+ people_array[i].getBanji() + " "
+ people_array[i].getScore());
}
}
}
}
程序运行结果:
更多精彩
赞助商链接