http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11945 Bug ID: 11945 Summary: Cronjob delete_expired_opac_registrations.pl fails with error in SQL syntax Change sponsored?: --- Product: Koha Version: 3.14 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: larry@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When running the cronjob, delete_expired_opac_registrations.pl on a 3.14 site, I get the following error message: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 6 at /usr/share/koha/bin/cronjobs/delete_expired_opac_registrations.pl line 76. Checking the script, I find this SQL code: my $query = " SELECT borrowernumber FROM borrowers WHERE categorycode = ? AND DATEDIFF( DATE( NOW() ), DATE(dateenrolled) ) = ? ) If I run that SQL statement in the database manually, I get the same error message, e.g.: mysql> select borrowernumber from borrowers where categorycode='SELF' AND DATEDIFF( DATE( NOW() ), DATE(dateenrolled) ) = 7 ); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 It would appear there's some problem with the DATEDIFF piece of the SELECT statement. - Larry -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.