[Koha] Issue with the Issues Table

Galen Charlton galen.charlton at liblime.com
Thu Mar 19 01:56:02 NZDT 2009


Hi,

2009/3/17 Shar Shar <disharum at yahoo.com>:
> [error] [client 99.87.456.1] [Tue Mar 17 22:39:58 2009] circulation.pl:
> DBD::mysql::st execute failed: Cannot add or update a child row: a foreign
> key constraint fails (`koha/issues`, CONSTRAINT `issues_ibfk_2` FOREIGN KEY
> (`itemnumber`) REFERENCES `items~` (`itemnumber`) ON DELETE SET NULL ON
> UPDATE SET NULL) at /usr/share/koha/lib/C4/Circulation.pm line 967.,
> referer: http://mysite.blabla.org:8080/cgi-bin/koha/circ/circulation.pl

What is the result of running 'show create table issues;' from a mysql
prompt?  Based on the error message, it appears that the issues table
was created with a foreign key constraint on an 'items~' table.
That's a little strange, because the foreign key relationship should
be with the 'items' table.  Dropping and recreating the issues_ibfk_2
constraint to point to items instead of items~ should fix the problem.

Regards,

Galen
-- 
Galen Charlton
VP, Research & Development, LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709
skype: gmcharlt


More information about the Koha mailing list