The problem: Field UserGroup.UserGroupID is NOT declared as autoincrement field and statement:
INSERT INTO UserGroup (UserGroupShortTitle ... don't fill this field. Check yourself with: SELECT * FROM UserGroup Check create autoincrement field : http://www.sqlite.org/faq.html#q1 CREATE TABLE UserGroup ( `UserGroupID` INTEGER PRIMARY KEY, .... Please see the INTEGER keywords in DDL. Good luck. ----- Original Message ----- From: <t...@selyoid.com> To: <sqlite-users@sqlite.org> Sent: Thursday, March 19, 2009 11:31 PM Subject: [sqlite] Problems with some SQL > Heya, > > I'm currently working on a simple setup for a news and user system. > However, I'm having some issues with the SQL I'm using. It's available @ > http://geekerzoid.pastebin.com/m532d173a > > I keep getting "SQL error: foreign-key violation: UserGroup.UserGroupID" > > Any help would be greatly appreciated. > > ~ Selyoid > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users