]> git.sur5r.net Git - bacula/bacula/commitdiff
Add a sort that helps for mysql.
authorDirk H Bartley <dbartley@schupan.com>
Fri, 27 Jul 2007 20:59:59 +0000 (20:59 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Fri, 27 Jul 2007 20:59:59 +0000 (20:59 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5252 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/restore/restoretree.cpp

index 663cadfcdf4ad0961b0ec2ee8c52c166ffdd48b1..05ed4cec563200f133749b81acec3deb7cbbc220 100644 (file)
@@ -380,13 +380,14 @@ void restoreTree::directoryCurrentItemChanged(QTreeWidgetItem *item, QTreeWidget
    QString directory = item->data(0, Qt::UserRole).toString();
    directoryLabel->setText("Present Working Directory : " + directory);
    QString cmd =
-      "SELECT DISTINCT Filename.Name"
+      "SELECT DISTINCT Filename.Name AS FileName"
       " FROM File "
       " LEFT OUTER JOIN Filename on (Filename.FilenameId=File.FilenameId)"
       " LEFT OUTER JOIN Path ON (Path.PathId=File.PathId)"
       " LEFT OUTER JOIN Job ON (File.JobId=Job.JobId)"
       " WHERE Path.Path='" + directory + "' AND Filename.Name!=''"
-      " AND Job.Jobid IN (" + m_jobQuery + ")";
+      " AND Job.Jobid IN (" + m_jobQuery + ")"
+      " ORDER BY FileName";
  
    QStringList headerlist = (QStringList() << "File Name");
    fileTable->clear();