[Koha-devel] SQL reports [error]
Paul
paul.a at aandc.org
Mon Apr 30 15:13:01 CEST 2012
Good morning all:
I have no problem with the philosophy of the following (bright yellow)
pop-up error message: "The following error was encountered: This report
contains the SQL keyword UPDATE.
Use of this keyword is not allowed in Koha reports due to security and data
integrity risks." and would not even consider suggesting a "bug."
However, it would be most helpful to staff for a very specific but
repetitive job that we do at year end (batch changing items.accessiondate
after Tax Receipts have been issued for donations) to be able to use Koha
from a work station, rather than getting me to work directly on the
production server (I've already been asked 50 or 60 times, and there's
another 400+ to go ...!)
Can anyone point me rapidly to the portion of script that I should have a
look at?
For the record, the CLI mysql in question is:
UPDATE items
SET dateaccessioned='2011-12-31'
WHERE price IS NOT NULL and price != '0.00'
AND booksellerid = 'xxx'
AND DATE(dateaccessioned) BETWEEN '2011-01-01' AND '2011-12-31';
Obviously for a report, I would use a construct for the last two conditions
along the lines of:
AND booksellerid = <<Pick your donor>>
AND DATE(dateaccessioned) BETWEEN <<Accessioned BETWEEN (yyyy-mm-dd)>> AND
<<and (yyyy-mm-dd)>>;
Thanks and best regards,
Paul
More information about the Koha-devel
mailing list