[Koha] Step by Step process to delete records

Robin Sheat robin at catalyst.net.nz
Thu Jul 25 23:05:59 NZST 2013


Op 24/07/13 09:12, malikaamir schreef:
> i have tried this command but this is giving this kind of error
> 
> 
> ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key
> constraint (`koha_libnamal`.`items`, CONSTRAINT `items_ibfk_1` FOREIGN KEY
> (`biblioitemnumber`) REFERENCES `koha_libnamal`.`biblioitems`
> (`biblioitemnumber`))
> 
> 
> so please help me 

Oh yeah, I forgot that, that is a slightly annoying change in newer mysql.

Run:

SET FOREIGN_KEY_CHECKS=0;

before the commands, and:

SET FOREIGN_KEY_CHECKS=1;

after it. If you want more information, putting that error into google
results in some good explanations.

-- 
Robin Sheat
Catalyst IT Ltd.
✆ +64 4 803 2204
GPG: 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D


More information about the Koha mailing list