View Single Post
  #4  
Old 07-24-2011, 05:19 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
One example of an error caused by the account not being added to the database:

Quote:
INSERT INTO tTask (pid, num, complete) VALUES ((SELECT tPlayer.pid FROM tPlayer WHERE tPlayer.account = 'Graal750778'), 0, 1)
The reason this is occurring is because I have a foreign key referring to tPlayer's primary key.
There is also a unique index on pid + num but this isn't the problem.

One example of an error caused by the account already existing within the database:

Quote:
INSERT INTO tPlayer (account, subscription, lastlogin, gelats, communityname) VALUES ('pc:5306287', 'trial', 1311299072, 0, 'guest')
This problem definitely isn't being caused by any of those values being NULL, the other constraint is a unique index on account.

All of the classes are joined and working before this is executed (otherwise this would be producing a function not found error)
Reply With Quote