/[BackupPC]/trunk/lib/BackupPC/SearchLib.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/BackupPC/SearchLib.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 15 by dpavlin, Thu Jun 23 12:36:22 2005 UTC revision 16 by dpavlin, Mon Jul 11 11:51:09 2005 UTC
# Line 126  sub getFiles($$) Line 126  sub getFiles($$)
126          "", "", { RaiseError => 1, AutoCommit => 1 } );          "", "", { RaiseError => 1, AutoCommit => 1 } );
127        my $sql =                  my $sql =          
128          q{            q{  
129                SELECT files.id                       AS fid,                  SELECT  files.id                        AS fid,
130                       hosts.name                     AS hname,                          hosts.name                      AS hname,
131                       shares.name                    AS sname,                          shares.name                     AS sname,
132                       shares.share                   AS sharename,                          shares.share                    AS sharename,
133                       backups.num                    AS backupNum,                          files.backupNum                 AS backupNum,
134                       files.name                     AS filename,                          files.name                      AS filename,
135                       files.path                     AS filepath,                          files.path                      AS filepath,
136                       shares.share||files.fullpath AS networkPath,                          shares.share||files.fullpath    AS networkPath,
137                       date(files.date, 'unixepoch', 'localtime') AS date,                          date(files.date, 'unixepoch', 'localtime') AS date,
138                       files.type                     AS filetype,                          files.type                      AS filetype,
139                       files.size                     AS size,                          files.size                      AS size,
140                       dvds.name                      AS dvd                          dvds.name                       AS dvd
141                    FROM                  FROM files
142                       files                          INNER JOIN shares       ON files.shareID=shares.ID
143                          INNER JOIN shares  ON files.shareID=shares.ID                          INNER JOIN hosts        ON hosts.ID = shares.hostID
144                          INNER JOIN hosts   ON hosts.ID = shares.hostID                          LEFT  JOIN dvds         ON dvds.ID = files.dvdid
                         INNER JOIN backups ON backups.hostID = hosts.ID  
                         LEFT  JOIN dvds    ON dvds.ID = files.dvdid  
               
145            };            };
146    
147        if (defined($where) && $where ne "")        if (defined($where) && $where ne "")

Legend:
Removed from v.15  
changed lines
  Added in v.16

  ViewVC Help
Powered by ViewVC 1.1.26