This table is being made
$tbl_entertour = "CREATE TABLE IF NOT EXISTS entertour (
team_id VARCHAR (16) NOT NULL,
tournament_id VARCHAR (16) NOT NULL,
provname_id VARCHAR (16) NOT NULL,
username VARCHAR (16) NOT NULL,
p_1_id VARCHAR (16) NOT NULL,
p_2_id VARCHAR (16) NOT NULL,
p_3_id VARCHAR (16) NOT NULL,
p_4_id VARCHAR (16) NOT NULL,
p_5_id VARCHAR (16) NOT NULL,
p_6_id VARCHAR (16) NOT NULL,
ip VARCHAR (255) NOT NULL,
entered DATETIME NOT NULL,
UNIQUE KEY username (username)
)";
$query = mysqli_query($db_conx, $tbl_entertour);
if ($query === TRUE) {
echo "<h3>entertour table created OK :) </h3>";
} else {
echo "<h3>entertour table NOT created :( </h3>";
}
This table is not being made
$tbl_provtour = "CREATE TABLE IF NOT EXISTS provtour (
id INT (11) NOT NULL AUTO_INCREMENT,
user_id VARCHAR (16) NOT NULL,
provname_id (16) NOT NULL,
tourname VARCHAR (25) NOT NULL,
team_total ENUM('0','999999') NOT NULL DEFAULT '0',
entered_teaams ENUM('0','999999') NOT NULL DEFAULT '0',
game VARCHAR (25) NOT NULL,
c_1 VARCHAR (25) NOT NULL,
c_2 VARCHAR (25) NOT NULL,
c_3 VARCHAR (25) NOT NULL,
c_open ('0','1') NOT NULL DEFAULT '0',
joinopen ('0','1') NOT NULL DEFAULT '0',
ip VARCHAR (255) NOT NULL,
reg_start DATETIME NOT NULL,
reg_end DATETIME NOT NULL,
created DATETIME NOT NULL,
lastupdated DATETIME NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY username (user_id)
)";
$query = mysqli_query($db_conx, $tbl_provtour);
if ($query === TRUE) {
echo "<h3>provtour table created OK :) </h3>";
} else {
echo "<h3>provtour table NOT created :( </h3>";
}
OK I am trying to create the second table in my database and it just doesn't seem to get made and comes back with the 2nd echo. The top table gets made and same with all other tables get made but for some reason this bottom table doesn't.
I am not sure why. I have been looking at it for about 10 minutes now and I just cant seem to find the error.
Thanks