From: Dirk H Bartley Date: Fri, 27 Jul 2007 20:59:59 +0000 (+0000) Subject: Add a sort that helps for mysql. X-Git-Tag: Release-7.0.0~5934 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f17e07591d84f62fe64a00f2de9acc19971ca8c1;p=bacula%2Fbacula Add a sort that helps for mysql. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5252 91ce42f0-d328-0410-95d8-f526ca767f89 --- 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();