fixed join with backups to show just increments
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Mon, 11 Jul 2005 14:58:54 +0000 (14:58 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Mon, 11 Jul 2005 14:58:54 +0000 (14:58 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@20 8392b6e1-25fa-0310-8288-cc32f8e212ea

lib/BackupPC/SearchLib.pm

index 8334075..06ae268 100644 (file)
@@ -87,7 +87,7 @@ sub getFiles($$)
                FROM files 
                        INNER JOIN shares       ON files.shareID=shares.ID
                        INNER JOIN hosts        ON hosts.ID = shares.hostID
-                       INNER JOIN backups      ON backups.num = files.backupNum
+                       INNER JOIN backups      ON backups.num = files.backupNum and backups.hostID = hosts.ID
                        LEFT  JOIN dvds         ON dvds.ID = files.dvdid
          };