View Single Post
  #2 (permalink)  
Old 06-17-09, 18:11
bossbob bossbob is offline
BOD Member
 
Join Date: May 2009
Posts: 50
Default

I think I found what the problem is. I think it's the definition of the primary key field.

Try:

CREATE TABLE tblForumTitle (
fldForumID SMALLINT(5) UNIQUE NOT NULL AUTO_INCREMENT,
......


CREATE TABLE tblForumMessage (
fldMessage TEXT NOT NULL,
fldMemberID VARCHAR(15) NOT NULL DEFAULT '',
fldForumID SMALLINT(5) UNSIGNED NOT NULL,
......


the primary key in tblForumTitle (fldForumID) does not have the UNSIGNED keyword while the foreign key in tblForumMessage (fldForumID) has the UNSIGNED keyword. This keyword is causing the problem - inconsistent type of field. So if you add the UNSIGNED keyword to fldForumID in tblForumTitle:

CREATE TABLE tblForumTitle (
fldForumID SMALLINT(5) UNSIGNED UNIQUE NOT NULL AUTO_INCREMENT,
......


it should work. Give it a try, what have you got to lose?
Reply With Quote