[Koha] SQL Report with Links

Eric Bégin Eric.Begin at inLibro.com
Sat May 23 03:34:28 NZST 2009


Hi,

I don't know if you are like me, but often I find it useful to get some 
links in the results of my miscelleneous SQL report.  This can be 
achieved using the SQL's CONCAT keyword.

The following SQL report list all items in your catalogue and the title 
is link to the biblio.
> SELECT itemtypes.description, CONCAT( '<a 
> href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=', 
> biblio.biblionumber, '\">',biblio.title,'</a>' ), items.itemcallnumber
> FROM biblio
> LEFT JOIN biblioitems on biblioitems.biblionumber = biblio.biblionumber
> LEFT JOIN itemtypes on biblioitems.itemtype = itemtypes.itemtype
> LEFT JOIN items on biblioitems.biblioitemnumber = items.biblioitemnumber
Enjoy!

--
Eric Bégin
http://www.inLibro.com
514.777.6572


More information about the Koha mailing list