diff options
| author | Nino Breuer | 2014-11-17 19:37:51 +0100 |
|---|---|---|
| committer | Nino Breuer | 2014-11-17 19:37:51 +0100 |
| commit | 48ffc3d241e820a99a3af2179cceedc818be0391 (patch) | |
| tree | dfac73310bc7339ee2ee7613af62aa4cd82c8366 /dozentenmodulserver/src/main/java/sql | |
| parent | • fixed bug where the os name was not set to the correct value while editin... (diff) | |
| parent | • Images can now be updated without destroying everything... (diff) | |
| download | tutor-module-48ffc3d241e820a99a3af2179cceedc818be0391.tar.gz tutor-module-48ffc3d241e820a99a3af2179cceedc818be0391.tar.xz tutor-module-48ffc3d241e820a99a3af2179cceedc818be0391.zip | |
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Diffstat (limited to 'dozentenmodulserver/src/main/java/sql')
| -rw-r--r-- | dozentenmodulserver/src/main/java/sql/SQL.java | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/dozentenmodulserver/src/main/java/sql/SQL.java b/dozentenmodulserver/src/main/java/sql/SQL.java index 2551df4c..10afee96 100644 --- a/dozentenmodulserver/src/main/java/sql/SQL.java +++ b/dozentenmodulserver/src/main/java/sql/SQL.java @@ -1713,33 +1713,17 @@ public class SQL { try {
Connection con = getConnection();
Statement stm = con.createStatement();
- String image_path = "prod/" + name;
- /*
- log.info(new Date()
- + " - Updating ImagePath with: UPDATE `bwLehrpool`.`m_VLData_imageInfo` SET `image_path` = '"
- + image_path + "' WHERE `image_path` = '" + "temp/" + name
- + "';");
- */
- /*
- stm.executeUpdate("UPDATE `bwLehrpool`.`m_VLData_imageInfo` SET `image_path` = '"
- + image_path
- + "' WHERE `image_path` = '"
- + "temp/"
- + name
- + "';");
- */
String sql = "UPDATE bwLehrpool.m_VLData_imageInfo SET image_path = "
- + "?"
- + " WHERE image_path = '"
- + "temp/"
- + "'?"
+ + "?" //prod/+name
+ + " WHERE image_path = "
+ + "?" //temp/+name
+ ";";
PreparedStatement prest = con.prepareStatement(sql);
- prest.setString(1, image_path);
- prest.setString(2, name);
+ prest.setString(1, "prod/"+name);
+ prest.setString(2, "temp/"+name);
prest.executeUpdate();
|
