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