<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1">
</HEAD>
<BODY>
On Sun, 2009-01-04 at 18:09 -0700, Jesse Weaver wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
On Sun, Jan 4, 2009 at 5:26 PM, John Wesley Simpson Hibbs <<A HREF="mailto:john@swajime.com">john@swajime.com</A>> wrote:
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
On Sun, 2009-01-04 at 16:19 -0700, Jesse Weaver wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
On Sun, Jan 4, 2009 at 12:08 PM, John Wesley Simpson Hibbs <<A HREF="mailto:john@swajime.com">john@swajime.com</A>> wrote:<BR>
<BLOCKQUOTE>
I've manually deleted the inaccessible records from the koha sql database, and moved newer records #18 - #21 into their place.<BR>
Now, though, it seems I can't get rid of the "gap" in the numbering sequence. When I go to add a new record, the next biblio number assigned is higher than it ought to be.<BR>
The last record in the database is now #17, and yet when I add a record it is assigned #22.<BR>
How can I fix this?<BR>
<BR>
<FONT COLOR="#000000"># mysql -Dkoha -ukohaasuper -pkoha4mylibrary -e "select biblionumber,isbn from biblioitems"</FONT><BR>
<FONT COLOR="#000000"> </FONT><BR>
<FONT COLOR="#000000">+--------------+----------------+</FONT><BR>
<FONT COLOR="#000000">| biblionumber | isbn |</FONT><BR>
<FONT COLOR="#000000">+--------------+----------------+</FONT><BR>
<FONT COLOR="#000000">| 1 | NULL |</FONT><BR>
<FONT COLOR="#000000">| 2 | 003071592X (pb |</FONT><BR>
<FONT COLOR="#000000">| 3 | 003069549X : |</FONT><BR>
<FONT COLOR="#000000">| 4 | 002093081X : |</FONT><BR>
<FONT COLOR="#000000">| 5 | 0030536111 | 0 |</FONT><BR>
<FONT COLOR="#000000">| 6 | 0025349201 |</FONT><BR>
<FONT COLOR="#000000">| 7 | 0025907859 : |</FONT><BR>
<FONT COLOR="#000000">| 8 | 0026019604 |</FONT><BR>
<FONT COLOR="#000000">| 9 | 0028610873 |</FONT><BR>
<FONT COLOR="#000000">| 10 | 002870763X |</FONT><BR>
<FONT COLOR="#000000">| 11 | 0028619811 |</FONT><BR>
<FONT COLOR="#000000">| 12 | 002862114X (pb |</FONT><BR>
<FONT COLOR="#000000">| 13 | 0028627288 |</FONT><BR>
<FONT COLOR="#000000">| 14 | 0028627423 |</FONT><BR>
<FONT COLOR="#000000">| 15 | 0028633822 |</FONT><BR>
<FONT COLOR="#000000">| 16 | 0028639235 |</FONT><BR>
<FONT COLOR="#000000">| 17 | 002864171X |</FONT><BR>
<FONT COLOR="#000000">| 22 | 0060158719 : |</FONT><BR>
<FONT COLOR="#000000">| 23 | 006016848X (cl |</FONT><BR>
<FONT COLOR="#000000">+--------------+----------------+</FONT> <BR>
<BR>
<BR>
<BR>
On Thu, 2009-01-01 at 21:45 -0600, John Wesley Simpson Hibbs wrote:<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<BR>
Has anybody found a solution to <A HREF="http://lists.katipo.co.nz/public/koha/2008-December/016248.html">http://lists.katipo.co.nz/public/koha/2008-December/016248.html</A> ?<BR>
<BR>
I'm getting exactly the same error:<BR>
<BR>
<B><FONT SIZE="6">Koha error</FONT></B><BR>
The following fatal error has occurred:<BR>
<BR>
<PRE>
Can't call method "fields" on an undefined value at /usr/share/koha/lib/C4/Biblio.pm line 1642.
</PRE>
<TABLE>
<TR>
<TH ALIGN="center">
<DIV ALIGN=center><B>Apache</B></DIV>
</TH>
<TD>
Server version: Apache/2.2.8 (Ubuntu) Server built: Jun 25 2008 13:54:13
</TD>
</TR>
<TR>
<TH ALIGN="center">
<DIV ALIGN=center><B>Koha</B></DIV>
</TH>
<TD>
3.00.00.107
</TD>
</TR>
<TR>
<TH ALIGN="center">
<B>Koha DB</B>
</TH>
<TD>
3.0000107
</TD>
</TR>
<TR>
<TH ALIGN="center">
<B>MySQL</B>
</TH>
<TD>
mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2
</TD>
</TR>
<TR>
<TH ALIGN="center">
<B>OS</B>
</TH>
<TD>
Linux lamentations 2.6.24-22-generic #1 SMP Mon Nov 24 18:32:42 UTC 2008 i686 GNU/Linux
</TD>
</TR>
<TR>
<TH ALIGN="center">
<DIV ALIGN=center><B>Perl</B></DIV>
</TH>
<TD>
5.008008
</TD>
</TR>
</TABLE>
<BR>
I don't think I'm the only one experiencing this problem...<BR>
This google search comes up with 112 hits:<BR>
<A HREF="http://www.google.com/search?q=koha+%22Can%27t+call+method+fields+on+an+undefined+value%22+%22line+1642%22">http://www.google.com/search?q=koha+%22Can%27t+call+method+fields+on+an+undefined+value%22+%22line+1642%22</A><BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
John Wesley Simpson Hibbs <<A HREF="mailto:john@swajime.com">john@swajime.com</A>><BR>
SwaJime's Cove
</TD>
</TR>
</TABLE>
<PRE>
_______________________________________________
Koha mailing list
<A HREF="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</A>
<A HREF="http://lists.katipo.co.nz/mailman/listinfo/koha">http://lists.katipo.co.nz/mailman/listinfo/koha</A>
</PRE>
</BLOCKQUOTE>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
John Wesley Simpson Hibbs <<A HREF="mailto:john@swajime.com">john@swajime.com</A>><BR>
SwaJime's Cove
</TD>
</TR>
</TABLE>
<BR>
_______________________________________________<BR>
Koha mailing list<BR>
<A HREF="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</A><BR>
<A HREF="http://lists.katipo.co.nz/mailman/listinfo/koha">http://lists.katipo.co.nz/mailman/listinfo/koha</A><BR>
<BR>
</BLOCKQUOTE>
<BR>
(In reference to your numbering problem)<BR>
<BR>
This is part of MySQL's design, and is not something Koha has control over, though it shouldn't cause you any problems.<BR>
<BR>
It is possible to change this counter, but you'll still have holes in the future if you delete records in the middle of the numbering sequence.<BR>
<BR>
-- <BR>
Jesse Weaver<BR>
Software Developer, LibLime
</BLOCKQUOTE>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
Jess,<BR>
<BR>
Ok, just for grins, would you mind sharing with me how I can go about changing the counter?<BR>
Whether it's malignant or not, it is really annoying me...<BR>
BTW, Mr. Adrian Monk is on tv tonight, and I'm sure he'd agree with me.
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
John Wesley Simpson Hibbs <<A HREF="mailto:john@swajime.com">john@swajime.com</A>><BR>
SwaJime's Cove
</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
So you have a bit of CDO (the letters should be in ALPHABETICAL ORDER, dangit)? ;)<BR>
<BR>
Anyway, the SQL you need is:<BR>
<BR>
ALTER TABLE biblio SET AUTO_INCREMENT = 18<BR>
<BR>
(after you delete the biblios after the jump)<BR>
<BR>
-- <BR>
Jesse Weaver<BR>
Software Developer, LibLime<BR>
</BLOCKQUOTE>
Jesse,<BR>
<BR>
Awesome, thank you, very much. :-D<BR>
<BR>
So, what I've done, for anybody else who might want to know:<BR>
<BLOCKQUOTE>
UPDATE biblio SET biblionumber = 21 where biblionumber = 24;<BR>
UPDATE biblioitems SET biblioitemnumber = 21, biblionumber = 21 WHERE biblioitemnumber = 24 ;<BR>
ALTER TABLE biblio AUTO_INCREMENT = 24;<BR>
ALTER TABLE biblioitems AUTO_INCREMENT = 24;<BR>
</BLOCKQUOTE>
This worked perfectly (unless I've messed up something else that I don't know about yet). :-)<BR>
<BR>
So, if I might ask another question...<BR>
I can do a search for say "guide", and get several books listed. It seems, though, that I cannot do a search for "*". How can I list all (24) of the books in the library?<BR>
<BR>
24 down, ~1450 to go...<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
John Wesley Simpson Hibbs <<A HREF="mailto:john@swajime.com">john@swajime.com</A>><BR>
SwaJime's Cove
</TD>
</TR>
</TABLE>
</BODY>
</HTML>