Hi everyone.
I really need some help.
I am trying to create a table that has the following fields as primary:
leagueIndexID
playerID
Also I want playerID to auto increment. However, I want it to auto increment based on that leagueIndexID.
Eg)
leagueIndexID PlayerID
1 1
1 2
1 3
2 1
2 2
2 3
I have looked this up and I cannot get it.
I had these results:
leagueIndexID PlayerID
1 1
1 2
1 3
2 4
2 5
2 6
notice the playerID increments but has nothing to do with the leagueIndexID. This is not right.
I had something like this:
CREATE TABLE 1newITPlayer (
LeagueIndexID float(11,0) NOT NULL default '0',
PlayerID double(16,0) NOT NULL auto_increment,
PlayerNum float NOT NULL default '0',
PRIMARY KEY (PlayerID,LeagueIndexID)
) TYPE=MyISAM;
Please help me. Thank you for your time. Any help is greatly appreciated.