From 05fea4cdc6488e0b56cb781bed3a52204a11cd40 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 11 Feb 2016 22:54:29 +0100 Subject: [PATCH] Aurhg, and get all the properties, not just id --- scripts/delete_orphan_files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/delete_orphan_files.php b/scripts/delete_orphan_files.php index aa3046855f..e11220b373 100755 --- a/scripts/delete_orphan_files.php +++ b/scripts/delete_orphan_files.php @@ -39,7 +39,7 @@ require_once INSTALLDIR.'/scripts/commandline.inc'; print "Finding File entries that are not related to a Notice (or the notice has been deleted)..."; $file = new File(); -$sql = 'SELECT file.id FROM file'. +$sql = 'SELECT file.* FROM file'. ' JOIN file_to_post ON file_to_post.file_id=file.id'. ' WHERE'. ' NOT EXISTS (SELECT file_to_post.file_id FROM file_to_post WHERE file.id=file_to_post.file_id)'. -- 2.39.5