[Koha] Display question

Robin Sheat robin at catalyst.net.nz
Mon Nov 2 14:25:33 NZDT 2015

Paul A schreef op do 29-10-2015 om 18:10 [-0400]:
> But this brings up the question "how to restore a deleted biblio?"
> It's 
> been mentioned a couple of times on this list, with people trying to
> use 
> MySQL INSERT statements and failing without using MarcEdit as an
> intermediary.

It's easy. The simple but risky way is:

insert into biblio (select * from deletedbiblio where biblionumber=2);
insert into biblioitems (select * from deletedbiblioitems where biblionumber=2);
delete from deletedbiblioitems where biblionumber=2;
delete from deletedbiblio where biblionumber=2;

This presupposes that the columns are identical in order between
biblio(items) and deletedbiblio(items), which should be true but may not

The better way is something like:

insert into biblio (biblionumber, frameworkcode, author, ...) select biblionumber, frameworkcode, author, ... from deletedbiblio where biblionumber=2;

filling out all the fields, and obviously '2' is the example
biblionumber I'm using.

Robin Sheat
Catalyst IT Ltd.
✆ +64 4 803 2204
GPG: 5FA7 4B49 1E4D CAA4 4C38  8505 77F5 B724 F871 3BDF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <https://lists.katipo.co.nz/pipermail/koha/attachments/20151102/ed47ed99/attachment.sig>

More information about the Koha mailing list