FIXED: SQL error when creating a "Todo" entry


Back to topics list
[post:522#5152]
Devil Doll

06/24/2011 08:48 PM

Reviews: 365
Posts: 1571

System error
error: SQL: INSERT INTO posts (posted, topic_id, poster_id, message, version, reviewer_id,updated)
VALUES ('2011-06-24 20:43:23', '0', '752', 'I'd like the "Wiki:" namespace <small>(class:interwiki)</small> to generate an additional HTML code 'target="Wiki"' for its hyperlink so that any Wiki link would open in a separate tab resp. window <small>(the latter depending on browser configuration)</small> but reusing this Wiki tab for any additional "Wiki" links.', '1', '752', NOW())

ERROR: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`anime/posts`, CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`topic_id`) REFERENCES `topics` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) at /opt/www/anime/lib/DBIx/Versioning.pm line 150.

Stack:
[/opt/www/anime/lib/DBIx/Versioning.pm:150]
[/opt/www/anime/lib/AO/DB/Default.pm:329]
[/mnt/rest/home/turner/Dropbox/perl/anime/html/forum/newtopic.html:42]
[/mnt/rest/home/turner/Dropbox/perl/anime/html/autohandler:102]
context:
...
154: VALUES ($field_place_holders, ?, ?, NOW())
155: EOSQL
156: my @fields = (@field_values,1,$self->whoami);
157: $sql =~ s{\?}{"'".shift(@fields)."'"}ge;
158: die "SQL: $sql ERROR: $@";
159: }
160: return $self->{'dbh'}->last_insert_id(undef,undef,undef,undef);
161: }
162:
...
code stack: /opt/www/anime/lib/DBIx/Versioning.pm:158
/opt/www/anime/lib/AO/DB/Default.pm:329
/mnt/rest/home/turner/Dropbox/perl/anime/html/forum/newtopic.html:42
/mnt/rest/home/turner/Dropbox/perl/anime/html/autohandler:102
raw error

[post:522#5240]
Devil Doll

07/05/2011 07:49 PM

Reviews: 365
Posts: 1571

The thread in question has a number of "-1" replies, maybe that's somehow related to the nature of the problem?

Reply to this topic Start a new topic
Back to topics list

Community Anime Reviews

anime mikomi org