[Koha-devel] Retrieving 10-digit ISBNs in a report

Nicholas van Oudtshoorn vanoudt at gmail.com
Thu Mar 8 07:01:23 CET 2012


Hi Cab,

If it's of any help, the 'carousel of book covers' system we use at 
library.pbc.wa.edu.au is available. It also incorporates our fake book 
cover generating system for books that don't have a cover-image 
available. Rather than generating a report, we chose to extract the data 
directly from SQL...

A (slightly old - if you want the latest version I can get it when I'm 
back on site next week) version of our carousel-generating code can be 
downloaded here:
http://dl.dropbox.com/u/8648526/August2011_librarycoversystem.tar.bz2

(See also the newsgroup archives from 19 August 2011.) The changes that 
have been made since then are mostly cosmetic and to do with tidying the 
code... but I guess that's what important!

If all you're looking for is the SQL, this is what we *were* using. (We 
now show the latest 30 books regardless of date)

SELECT items.biblionumber AS biblionumber, isbn, title, author, 
coverlocation FROM ((items JOIN biblio ON items.biblionumber = 
biblio.biblionumber) JOIN biblioitems on 
items.biblionumber=biblioitems.biblioitemnumber AND 
items.biblioitemnumber=biblioitems.biblioitemnumber) LEFT JOIN 
bibliocovers on items.biblionumber = bibliocovers.biblionumber WHERE 
dateaccessioned > SUBDATE(SYSDATE(), INTERVAL 31 DAY) AND iType='BOOK' 
ORDER BY dateaccessioned DESC";


There's some extra stuff in there, because our cover system generates 
"fake" covers for books that don't actually have an image available. (As 
you'll notice on our library page).

Hope this might be of at least *some* help!

God bless,
Nick

On 03/07/2012 05:50 AM, Cab Vinton wrote:
> Hi, All --
>
> For the purposes of creating a web-based carousel of book covers of
> our recent acquisitions, I'd like to run a report that generates a
> list of ISBNs of items added between 2 dates.
>
> Amazon&  therefore Koha rely on 10-digit ISBNs for book cover retrieval.
>
> However, when I run a report using biblioitems.isbn, this is the
> output I get. Many truncated ISBNs, presumably because the max length
> = 30 restriction.
>
> 9780425243244 (pbk.) | 0425243
> 9780307718099 | 0307718093
> 0804840288 | 9780804840286 (tr
> 9780811876377 : | 0811876373 :
> 1569244677
> 9781400064588 (acidfree paper)
> 9780061429255 | 0061429252
> 9781451661064 (hardcover) | 14
>
> Is there a way to run a report that outputs only the 10 digit ISBNs?
>
> Many thanks,
>
> Cab Vinton, Director
> Sanbornton Public Library
> Sanbornton, NH
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>




More information about the Koha-devel mailing list