"StartTime,Type as JobType,JobStatus,JobFiles,JobBytes "
"FROM Client,Job,File,Filename,Path WHERE Client.Name='%s' "
"AND Client.ClientId=Job.ClientId "
- "AND Job.JobId=File.JobId "
+ "AND Job.JobId=File.JobId AND File.FileIndex > 0 "
"AND Path.PathId=File.PathId AND Filename.FilenameId=File.FilenameId "
"AND Filename.Name='%s' ORDER BY StartTime DESC LIMIT 20",
/* Postgresql */
"StartTime,Type as JobType,JobStatus,JobFiles,JobBytes "
"FROM Client,Job,File,Filename,Path WHERE Client.Name='%s' "
"AND Client.ClientId=Job.ClientId "
- "AND Job.JobId=File.JobId "
+ "AND Job.JobId=File.JobId AND File.FileIndex > 0 "
"AND Path.PathId=File.PathId AND Filename.FilenameId=File.FilenameId "
"AND Filename.Name='%s' ORDER BY StartTime DESC LIMIT 20",
/* SQLite */
"StartTime,Type as JobType,JobStatus,JobFiles,JobBytes "
"FROM Client,Job,File,Filename,Path WHERE Client.Name='%s' "
"AND Client.ClientId=Job.ClientId "
- "AND Job.JobId=File.JobId "
+ "AND Job.JobId=File.JobId AND File.FileIndex > 0 "
"AND Path.PathId=File.PathId AND Filename.FilenameId=File.FilenameId "
"AND Filename.Name='%s' ORDER BY StartTime DESC LIMIT 20",
/* SQLite3 */
"StartTime,Type as JobType,JobStatus,JobFiles,JobBytes "
"FROM Client,Job,File,Filename,Path WHERE Client.Name='%s' "
"AND Client.ClientId=Job.ClientId "
- "AND Job.JobId=File.JobId "
+ "AND Job.JobId=File.JobId AND File.FileIndex > 0 "
"AND Path.PathId=File.PathId AND Filename.FilenameId=File.FilenameId "
"AND Filename.Name='%s' ORDER BY StartTime DESC LIMIT 20"};