*** empty log message ***
[mir.git] / source / mircoders / storage / DatabaseContentToMedia.java
index 2f85cd2..c2d2ac1 100755 (executable)
@@ -51,7 +51,7 @@ public class DatabaseContentToMedia extends Database implements StorageObject{
       // get all to_topic from media_x_topic
       String id = content.getId();
       //this is not supported by mysql
-      String subselect = "id in (select to_media from " + theTable + " where content_id=" + id+")";
+      String subselect = "id in (select media_id from " + theTable + " where content_id=" + id+")";
 
       try {
         returnList = DatabaseMedia.getInstance().selectByWhereClause(subselect,-1);
@@ -103,6 +103,7 @@ public class DatabaseContentToMedia extends Database implements StorageObject{
       try {
         returnList = DatabaseMedia.getInstance().selectByWhereClause(subselect,"id");
       } catch (Exception e) {
+        e.printStackTrace();
         theLog.printDebugInfo("-- get uploadedMedia failed " + e.toString());
         throw new StorageObjectException("-- get uploadedMedia failed " + e.toString());
       }