FROM backups
INNER JOIN shares ON backups.shareID=shares.ID
INNER JOIN hosts ON backups.hostID = hosts.ID
- where hosts.name = ? and shares.name = ? and backups.num = ?
+ WHERE hosts.name = ? and shares.name = ? and backups.num = ?
});
$sth->execute($host, $share, $num);
my ($id) = $sth->fetchrow_array;
and shares.id = backups.shareid
join hosts on shares.hostid = hosts.id
full outer join backup_parts on backups.id = backup_parts.backup_id
-where not inc_deleted
+where not inc_deleted and backups.size > 0
group by backups.id, hosts.name, shares.name, backups.num, backups.date, inc_size, parts, backup_parts.backup_id
order by backups.date