diff options
Diffstat (limited to 'Dozentenmodulserver/src/sql')
| -rw-r--r-- | Dozentenmodulserver/src/sql/SQL.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java index 0a2f5ab2..ec1ea11f 100644 --- a/Dozentenmodulserver/src/sql/SQL.java +++ b/Dozentenmodulserver/src/sql/SQL.java @@ -446,4 +446,56 @@ public class SQL { }
return -1;
}
+
+ public int updateLectureData(Connection con, int pk_person, int pk_image,
+ int imageversion, String name, String desc, String shortdesc,
+ String start, String end, boolean isactive, String id) {
+
+ DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+ int active_bol = 0;
+
+ if (isactive == true) {
+ active_bol = 1;
+ }
+ try {
+ Statement stm = con.createStatement();
+ Random random = new Random();
+ int uid = random.nextInt();
+ stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_lecture`(`lectureID`,`name`,`isActive`,`startTime`,`endTime`,`lastUsed`,`shortDescription`,`description`,`imageID`,`imageVersion`,`admin_createTime`,`admin_changeTime`,`admin_owner`,`admin_change_by`)VALUES('"
+ + uid
+ + "','"
+ + name
+ + "','"
+ + active_bol
+ + "','"
+ + start
+ + "','"
+ + end
+ + "','"
+ + formatter.format(new Date())
+ + "','"
+ + shortdesc
+ + "','"
+ + desc
+ + "','"
+ + pk_image
+ + "','"
+ + imageversion
+ + "','"
+ + formatter.format(new Date())
+ + "','"
+ + formatter.format(new Date())
+ + "','"
+ + pk_person
+ + "','"
+ + pk_person + "');");
+ con.commit();
+
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return 0;
+
+ }
}
|
