From bugzilla-daemon@bugs.koha-community.org Wed Dec 10 13:08:03 2014 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 13429] New: Add helper SQL functions for report use Date: Wed, 10 Dec 2014 12:07:57 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6765056907034671594==" --===============6765056907034671594== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D13429 Bug ID: 13429 Summary: Add helper SQL functions for report use Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Database Assignee: gmcharlt@gmail.com Reporter: pasi.kallinen@pttk.fi QA Contact: testopia@bugs.koha-community.org To make creating SQL reports easier, there should be some helper functions in the database. For example, looking at the SQL Reports Library, there are several functions that create URLs to the staff client: CONCAT('',biblio.biblionumber,'') Adding the following function: DROP FUNCTION IF EXISTS StaffUrl; DELIMITER $$ CREATE FUNCTION StaffUrl(url text, linkname text) RETURNS text BEGIN RETURN CONCAT('', linkname, ''); END$$ The example above would turn into StaffUrl(CONCAT('catalogue/detail.pl?biblionumber=3D',biblio.biblionumber), biblio.biblionumber) --=20 You are receiving this mail because: You are watching all bug changes. --===============6765056907034671594==--