https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28001 Bug ID: 28001 Summary: delete_patrons.pl requires category but does not mention this in POD Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz You cannot run the script without category, the SQL fails - we should either fix this or note that category is mandatory in the script root@kohadevbox:koha(master)$ perl misc/cronjobs/delete_patrons.pl --expired_before =1910-01-01 C4::Members::GetBorrowersToExpunge(): DBI Exception: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') GROUP BY borrowers.borrowernumber ) xxx WHERE currentissue IS NULL' at line 12 [for Statement " SELECT * FROM ( SELECT borrowers.borrowernumber, MAX(old_issues.timestamp) AS latestissue, MAX(issues.timestamp) AS currentissue FROM borrowers JOIN categories USING (categorycode) LEFT JOIN ( SELECT guarantor_id FROM borrower_relationships WHERE guarantor_id IS NOT NULL AND guarantor_id <> 0 ) as tmp ON borrowers.borrowernumber=tmp.guarantor_id LEFT JOIN old_issues USING (borrowernumber) LEFT JOIN issues USING (borrowernumber) WHERE category_type <> 'S' AND ( borrowers.flags IS NULL OR borrowers.flags = 0 ) AND tmp.guarantor_id IS NULL AND dateexpiry < ? AND categorycode IN () GROUP BY borrowers.borrowernumber -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.