From f17e07591d84f62fe64a00f2de9acc19971ca8c1 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Fri, 27 Jul 2007 20:59:59 +0000 Subject: [PATCH] Add a sort that helps for mysql. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5252 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/restore/restoretree.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bacula/src/qt-console/restore/restoretree.cpp b/bacula/src/qt-console/restore/restoretree.cpp index 663cadfcdf..05ed4cec56 100644 --- a/bacula/src/qt-console/restore/restoretree.cpp +++ b/bacula/src/qt-console/restore/restoretree.cpp @@ -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(); -- 2.39.5