[Koha-devel] RFC 3.2 : guided reports improved
Jesse Weaver
jesse.weaver at liblime.com
Fri Aug 29 23:31:36 CEST 2008
On Fri, Aug 29, 2008 at 3:18 PM, Rick Welykochy <rick at praxis.com.au> wrote:
> Henri-Damien LAURENT wrote:
>
> >> <guided_report kohaversion="3.00.107">
> >> <title>Patrons nearing expiry</title>
> >> <module>Members</module>
> >> <description>Patrons with expiry dates in the next n
> days</description>
> >> <sql>SELECT cardnumber, surname, firstname, branchcode,
> >> categories.description, dateexpiry from borrowers
> >> LEFT JOIN categories on
> >> borrowers.categorycode=categories.categorycode
> >> WHERE DATEDIFF( dateexpiry, CURDATE() ) < ???Number of Days???
>
> The above is invalid XML. If a librarian / non-programmer is exposed
> to this stuff, chaos will quickly ensue.
>
> Writing a correct XML application is not for kids.
>
>
> cheers
> rickw
>
OK then. How about YAML?
required_version: 3.00.00.107
title: Patrons nearing expiry
module: Members
description: Patrons with expiry dates in the next n days
sql: SELECT cardnumber, surname, firstname, branchcode,
categories.description, dateexpiry from borrowers
LEFT JOIN categories on borrowers.categorycode=categories.categorycode
WHERE DATEDIFF( dateexpiry, CURDATE() ) < ???Number of Days???
AND branchcode = ???LIST:branchcode???
ORDER BY categories.description, dateexpiry
(NOTE: the indents on the last lines of the SQL statement are kept together
because they are indented)
This has the advantage of being easy to understand and write, and YAML is
fairly standard (CPAN uses it, among others).
---
Jesse Weaver
Software Developer, LibLime
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20080829/5b573821/attachment-0003.htm>
More information about the Koha-devel
mailing list