[Bug 10635] New: can't query for create in action_logs
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10635 Bug ID: 10635 Summary: can't query for create in action_logs Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Reports Assignee: gmcharlt@gmail.com Reporter: nengard@gmail.com QA Contact: testopia@bugs.koha-community.org Created attachment 19888 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19888&action=edit error I wrote this report: SELECT p.cardnumber, p.surname, p.firstname, p.streetnumber, p.address, p.address2, p.city, p.state, p.zipcode, p.email, p.phone, p.dateenrolled, p.smsalertnumber, l.action, l.timestamp as 'action taken' FROM borrowers p left join action_logs l on (p.borrowernumber=l.object) where l.module='MEMBERS' and date(l.timestamp) between date_sub(curdate(), interval 1 week) and curdate() and l.action in ('MODIFY','CREATE') And get the attached error which says I can't use the word 'CREATE' but that's the word in the table ... so maybe we need to remove this restriction or change the wording in the table so that it can be queried. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10635 --- Comment #1 from Galen Charlton <gmcharlt@gmail.com> --- The restriction as a whole should not be removed to avoid the risk of a staff user inadvertently creating new tables in the database, but clearly it needs to be made a bit smarter. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10635 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m --- Comment #2 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- (In reply to Nicole C. Engard from comment #0)
Created attachment 19888 [details]
You may use a like : SELECT p.cardnumber, p.surname, p.firstname, p.streetnumber, p.address, p.address2, p.city, p.state, p.zipcode, p.email, p.phone, p.dateenrolled, p.smsalertnumber, l.action, l.timestamp AS 'action taken' FROM borrowers p LEFT JOIN action_logs l ON (p.borrowernumber=l.object) WHERE l.module='MEMBERS' AND date(l.timestamp) BETWEEN date_sub(curdate(), interval 1 week) AND curdate() AND (l.action LIKE 'MODIFY' OR l.action LIKE 'CREAT_') My 2c -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10635 --- Comment #3 from Nicole C. Engard <nengard@gmail.com> --- Of course there are ways around it - but I'm a fan of fixing the problem instead of working around it :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org