Location: PHPKode > projects > GolfstatsPHP > golfstatsphp_3.0/sqltables_3.0.txt
#
# Table structure for table `courses`
#

CREATE TABLE `courses` (
  `ID` int(5) NOT NULL auto_increment,
  `owner` varchar(15) NOT NULL default '',
  `courseid` varchar(5) default NULL,
  `coursename` varchar(70) default NULL,
  `courseaddress` varchar(100) default NULL,
  `coursestate` varchar(30) NOT NULL default '',
  `courserating` decimal(4,2) default NULL,
  `sloperating` decimal(4,2) default NULL,
  `coursepar` int(2) NOT NULL default '72',
  `courselength` int(10) NOT NULL default '0',
  `front9length` int(4) NOT NULL default '0',
  `front9` int(2) NOT NULL default '36',
  `back9` int(2) NOT NULL default '36',
  `back9length` int(4) NOT NULL default '0',
  `coursephone` varchar(15) NOT NULL default '',
  `coursefax` varchar(15) NOT NULL default '',
  `courseweb` varchar(50) NOT NULL default '',
  `coursenotes` text NOT NULL,
  `avgcoursegross` float(5,2) NOT NULL default '0.00',
  `avgcoursenet` float(5,2) NOT NULL default '0.00',
  `parhole1` int(1) NOT NULL default '4',
  `indexhole1` int(2) NOT NULL default '18',
  `lengthhole1` int(3) NOT NULL default '0',
  `parhole2` int(1) NOT NULL default '4',
  `indexhole2` int(2) NOT NULL default '18',
  `lengthhole2` int(3) NOT NULL default '0',
  `parhole3` int(1) NOT NULL default '4',
  `indexhole3` int(2) NOT NULL default '18',
  `lengthhole3` int(3) NOT NULL default '0',
  `parhole4` int(1) NOT NULL default '4',
  `indexhole4` int(2) NOT NULL default '18',
  `lengthhole4` int(3) NOT NULL default '0',
  `parhole5` int(1) NOT NULL default '4',
  `indexhole5` int(2) NOT NULL default '18',
  `lengthhole5` int(3) NOT NULL default '0',
  `parhole6` int(1) NOT NULL default '4',
  `indexhole6` int(2) NOT NULL default '18',
  `lengthhole6` int(3) NOT NULL default '0',
  `parhole7` int(1) NOT NULL default '4',
  `indexhole7` int(2) NOT NULL default '18',
  `lengthhole7` int(3) NOT NULL default '0',
  `parhole8` int(1) NOT NULL default '4',
  `indexhole8` int(2) NOT NULL default '18',
  `lengthhole8` int(3) NOT NULL default '0',
  `parhole9` int(1) NOT NULL default '4',
  `indexhole9` int(2) NOT NULL default '18',
  `lengthhole9` int(3) NOT NULL default '0',
  `parhole10` int(1) NOT NULL default '4',
  `indexhole10` int(2) NOT NULL default '18',
  `lengthhole10` int(3) NOT NULL default '0',
  `parhole11` int(1) NOT NULL default '4',
  `indexhole11` int(2) NOT NULL default '18',
  `lengthhole11` int(3) NOT NULL default '0',
  `parhole12` int(1) NOT NULL default '4',
  `indexhole12` int(2) NOT NULL default '18',
  `lengthhole12` int(3) NOT NULL default '0',
  `parhole13` int(1) NOT NULL default '4',
  `indexhole13` int(2) NOT NULL default '18',
  `lengthhole13` int(3) NOT NULL default '0',
  `parhole14` int(1) NOT NULL default '4',
  `indexhole14` int(2) NOT NULL default '18',
  `lengthhole14` int(3) NOT NULL default '0',
  `parhole15` int(1) NOT NULL default '4',
  `indexhole15` int(2) NOT NULL default '18',
  `lengthhole15` int(3) NOT NULL default '0',
  `parhole16` int(1) NOT NULL default '4',
  `indexhole16` int(2) NOT NULL default '18',
  `lengthhole16` int(3) NOT NULL default '0',
  `parhole17` int(1) NOT NULL default '4',
  `indexhole17` int(2) NOT NULL default '18',
  `lengthhole17` int(3) NOT NULL default '0',
  `parhole18` int(1) NOT NULL default '4',
  `indexhole18` int(2) NOT NULL default '18',
  `lengthhole18` int(3) NOT NULL default '0',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Golf Courses' AUTO_INCREMENT=45 ;

# --------------------------------------------------------

#
# Table structure for table `gameorg`
#

CREATE TABLE `gameorg` (
  `ID` int(5) NOT NULL auto_increment,
  `date` date NOT NULL default '0000-00-00',
  `time` time NOT NULL default '00:00:00',
  `courseid` varchar(5) NOT NULL default '',
  `eventname` varchar(50) NOT NULL default '',
  `userid` varchar(15) NOT NULL default '',
  `noplayers` int(2) NOT NULL default '0',
  `filled` int(2) NOT NULL default '0',
  `player1` varchar(15) NOT NULL default '',
  `player2` varchar(15) NOT NULL default '',
  `player3` varchar(15) NOT NULL default '',
  `player4` varchar(15) NOT NULL default '',
  `player5` varchar(15) NOT NULL default '',
  `player6` varchar(15) NOT NULL default '',
  `player7` varchar(15) NOT NULL default '',
  `player8` varchar(15) NOT NULL default '',
  `player9` varchar(15) NOT NULL default '',
  `player10` varchar(15) NOT NULL default '',
  `player11` varchar(15) NOT NULL default '',
  `player12` varchar(15) NOT NULL default '',
  `player13` varchar(15) NOT NULL default '',
  `player14` varchar(15) NOT NULL default '',
  `player15` varchar(15) NOT NULL default '',
  `player16` varchar(15) NOT NULL default '',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Game Organisation' AUTO_INCREMENT=22 ;

# --------------------------------------------------------

#
# Table structure for table `games`
#

CREATE TABLE `games` (
  `ID` int(5) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `userid` varchar(15) NOT NULL default '',
  `date` date NOT NULL default '0000-00-00',
  `courseid` varchar(5) NOT NULL default '',
  `handicap` int(2) NOT NULL default '0',
  `gross_score` int(3) NOT NULL default '0',
  `net_score` int(3) NOT NULL default '0',
  `stableford` int(3) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '0',
  `gir` char(2) NOT NULL default '0',
  `total_putts` char(3) NOT NULL default '0',
  `bunker` char(2) default '0',
  `sandsave` char(2) default '0',
  `longest_drive` char(3) NOT NULL default '0',
  `chipins` int(2) NOT NULL default '0',
  `tournament` char(1) default '0',
  `tourneyplace` int(2) default '0',
  `money` varchar(10) NOT NULL default '0',
  `points` varchar(10) NOT NULL default '0',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Games' AUTO_INCREMENT=164 ;

# --------------------------------------------------------

#
# Table structure for table `hole1`
#

CREATE TABLE `hole1` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Hole 1' AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole10`
#

CREATE TABLE `hole10` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole11`
#

CREATE TABLE `hole11` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole12`
#

CREATE TABLE `hole12` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole13`
#

CREATE TABLE `hole13` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole14`
#

CREATE TABLE `hole14` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=165 ;

# --------------------------------------------------------

#
# Table structure for table `hole15`
#

CREATE TABLE `hole15` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=165 ;

# --------------------------------------------------------

#
# Table structure for table `hole16`
#

CREATE TABLE `hole16` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=164 ;

# --------------------------------------------------------

#
# Table structure for table `hole17`
#

CREATE TABLE `hole17` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=164 ;

# --------------------------------------------------------

#
# Table structure for table `hole18`
#

CREATE TABLE `hole18` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=164 ;

# --------------------------------------------------------

#
# Table structure for table `hole2`
#

CREATE TABLE `hole2` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole3`
#

CREATE TABLE `hole3` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole4`
#

CREATE TABLE `hole4` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole5`
#

CREATE TABLE `hole5` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole6`
#

CREATE TABLE `hole6` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole7`
#

CREATE TABLE `hole7` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole8`
#

CREATE TABLE `hole8` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `hole9`
#

CREATE TABLE `hole9` (
  `ID` int(11) NOT NULL auto_increment,
  `gameid` varchar(15) NOT NULL default '',
  `courseid` varchar(5) NOT NULL default '',
  `par` int(1) NOT NULL default '4',
  `userid` varchar(15) NOT NULL default '',
  `gross` int(2) NOT NULL default '0',
  `gross_name` varchar(20) NOT NULL default '',
  `net` int(2) NOT NULL default '0',
  `net_name` varchar(20) NOT NULL default '',
  `stableford_pts` int(2) NOT NULL default '0',
  `fairway_hit` char(2) NOT NULL default '1',
  `gir` char(2) NOT NULL default '1',
  `putt` char(2) NOT NULL default 'na',
  `bunker` char(2) default '0',
  `sand_save` char(2) NOT NULL default '0',
  `drive_distance` char(3) NOT NULL default 'na',
  `teeclub` char(2) NOT NULL default 'dr',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=166 ;

# --------------------------------------------------------

#
# Table structure for table `holerank`
#

CREATE TABLE `holerank` (
  `ID` int(6) NOT NULL auto_increment,
  `courseid` varchar(5) NOT NULL default '',
  `holeid` int(2) NOT NULL default '0',
  `par` char(1) NOT NULL default '4',
  `avggross` float NOT NULL default '0',
  `avgnet` float NOT NULL default '0',
  `fwayhitpct` float NOT NULL default '0',
  `girpct` float NOT NULL default '0',
  `sandsavepct` float NOT NULL default '0',
  `avgputt` float NOT NULL default '0',
  `holelength` int(3) NOT NULL default '0',
  `avgscoregross` float NOT NULL default '4',
  `avgscorenet` float NOT NULL default '4',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Hole Ranking' AUTO_INCREMENT=289 ;

# --------------------------------------------------------

#
# Table structure for table `msgboard`
#

CREATE TABLE `msgboard` (
  `ID` int(6) NOT NULL auto_increment,
  `date` date NOT NULL default '0000-00-00',
  `msgtime` time NOT NULL default '00:00:00',
  `userid` varchar(15) NOT NULL default '',
  `message` text NOT NULL,
  `rambleid` tinyint(6) default '0',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Message Board' AUTO_INCREMENT=68 ;

# --------------------------------------------------------

#
# Table structure for table `ranking`
#

CREATE TABLE `ranking` (
  `ID` int(5) NOT NULL auto_increment,
  `userid` varchar(15) NOT NULL default '',
  `ddistance` float NOT NULL default '0',
  `daccuracy` float NOT NULL default '0',
  `dlongest` int(3) NOT NULL default '0',
  `girpct` float NOT NULL default '0',
  `puttavg` float NOT NULL default '0',
  `puttround` float NOT NULL default '0',
  `totaleagles` int(4) NOT NULL default '0',
  `totalholeinone` int(4) NOT NULL default '0',
  `totaldoubleeagles` int(4) NOT NULL default '0',
  `sandsavepct` float NOT NULL default '0',
  `birdieavg` float NOT NULL default '0',
  `paravg` float NOT NULL default '0',
  `avgscore` float NOT NULL default '0',
  `parbreakers` float NOT NULL default '0',
  `par3birdies` float NOT NULL default '0',
  `par4birdies` float NOT NULL default '0',
  `par5birdies` float NOT NULL default '0',
  `par3pars` float NOT NULL default '0',
  `par4pars` float NOT NULL default '0',
  `par5pars` float NOT NULL default '0',
  `par3perf` float NOT NULL default '0',
  `par4perf` float NOT NULL default '0',
  `par5perf` float NOT NULL default '0',
  `scrambling` float NOT NULL default '0',
  `net_totaleagles` int(4) NOT NULL default '0',
  `net_totalholeinone` int(4) NOT NULL default '0',
  `net_totaldoubleeagles` int(4) NOT NULL default '0',
  `net_birdieavg` float NOT NULL default '0',
  `net_paravg` float NOT NULL default '0',
  `net_avgscore` float NOT NULL default '0',
  `net_parbreakers` float NOT NULL default '0',
  `net_par3birdies` float NOT NULL default '0',
  `net_par4birdies` float NOT NULL default '0',
  `net_par5birdies` float NOT NULL default '0',
  `net_par3pars` float NOT NULL default '0',
  `net_par4pars` float NOT NULL default '0',
  `net_par5pars` float NOT NULL default '0',
  `net_par3perf` float NOT NULL default '0',
  `net_par4perf` float NOT NULL default '0',
  `net_par5perf` float NOT NULL default '0',
  `net_scrambling` float NOT NULL default '0',
  `total_money` int(10) NOT NULL default '0',
  `total_points` float NOT NULL default '0',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='player ranking' AUTO_INCREMENT=831 ;

# --------------------------------------------------------

#
# Table structure for table `substats`
#

CREATE TABLE `substats` (
  `ID` int(5) NOT NULL auto_increment,
  `userid` varchar(15) NOT NULL default '',
  `total_drive_distance` int(6) NOT NULL default '0',
  `total_drive` int(6) NOT NULL default '0',
  `total_fairways_hit` int(6) NOT NULL default '0',
  `poss_fairways` int(6) NOT NULL default '0',
  `total_gir` int(6) NOT NULL default '0',
  `total_bunker` int(6) NOT NULL default '0',
  `total_sandsave` int(6) NOT NULL default '0',
  `total_holes` int(6) NOT NULL default '0',
  `total_putts2` int(6) NOT NULL default '0',
  `total_holes_putt` int(6) NOT NULL default '0',
  `total_birdies` int(6) NOT NULL default '0',
  `total_rounds` int(6) NOT NULL default '0',
  `total_par` int(6) NOT NULL default '0',
  `total_gross` int(6) NOT NULL default '0',
  `total_parbreak` int(6) NOT NULL default '0',
  `total_putts1` int(6) NOT NULL default '0',
  `total_putt_rounds` int(6) NOT NULL default '0',
  `net_total_birdies` int(6) NOT NULL default '0',
  `net_total_par` int(6) NOT NULL default '0',
  `total_net` int(6) NOT NULL default '0',
  `net_total_parbreak` int(6) NOT NULL default '0',
  `par3_birdies` int(6) NOT NULL default '0',
  `par4_birdies` int(6) NOT NULL default '0',
  `par5_birdies` int(6) NOT NULL default '0',
  `par3_pars` int(6) NOT NULL default '0',
  `par4_pars` int(6) NOT NULL default '0',
  `par5_pars` int(6) NOT NULL default '0',
  `total_par3` int(6) NOT NULL default '0',
  `total_par4` int(6) NOT NULL default '0',
  `total_par5` int(6) NOT NULL default '0',
  `total_par3_scores` int(6) NOT NULL default '0',
  `total_par4_scores` int(6) NOT NULL default '0',
  `total_par5_scores` int(6) NOT NULL default '0',
  `scrambled_holes` int(6) NOT NULL default '0',
  `missed_gir` int(6) NOT NULL default '0',
  `net_par3_birdies` int(6) NOT NULL default '0',
  `net_par4_birdies` int(6) NOT NULL default '0',
  `net_par5_birdies` int(6) NOT NULL default '0',
  `net_par3_pars` int(6) NOT NULL default '0',
  `net_par4_pars` int(6) NOT NULL default '0',
  `net_par5_pars` int(6) NOT NULL default '0',
  `net_par3_scores` int(6) NOT NULL default '0',
  `net_par4_scores` int(6) NOT NULL default '0',
  `net_par5_scores` int(6) NOT NULL default '0',
  `net_scrambled_holes` int(6) NOT NULL default '0',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=831 ;

# --------------------------------------------------------

#
# Table structure for table `tips`
#

CREATE TABLE `tips` (
  `ID` int(5) NOT NULL auto_increment,
  `courseid` varchar(5) NOT NULL default '',
  `hole` int(2) NOT NULL default '0',
  `userid` varchar(15) NOT NULL default '',
  `tiptext` longtext NOT NULL,
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Golf Tips' AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `tourney`
#

CREATE TABLE `tourney` (
  `ID` int(5) NOT NULL auto_increment,
  `tourneyid` varchar(15) NOT NULL default '0',
  `tourneyname` varchar(60) default NULL,
  `tourneytype` varchar(30) NOT NULL default '0',
  `tourneyvenue` varchar(60) default NULL,
  `championid` varchar(15) NOT NULL default '',
  `championscore` varchar(15) NOT NULL default '',
  `date` date NOT NULL default '0000-00-00',
  `tourneypurse` varchar(10) NOT NULL default '0',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Tourney' AUTO_INCREMENT=11 ;

# --------------------------------------------------------

#
# Table structure for table `tourney_board`
#

CREATE TABLE `tourney_board` (
  `Id` int(6) unsigned NOT NULL auto_increment,
  `tourneyid` varchar(15) default NULL,
  `userid` varchar(15) default NULL,
  `msgtype` varchar(20) default '0',
  `msgdate` date default NULL,
  `msgtime` time default '00:00:00',
  `msgbody` text,
  PRIMARY KEY  (`Id`)
) TYPE=MyISAM AUTO_INCREMENT=31 ;

# --------------------------------------------------------

#
# Table structure for table `tourney_stat`
#

CREATE TABLE `tourney_stat` (
  `Id` int(6) unsigned NOT NULL auto_increment,
  `tourneyid` varchar(15) default '0',
  `top_gross_score` varchar(50) default '0',
  `top_net_score` varchar(50) default '0',
  `top_gir` varchar(50) default '0',
  `top_sandsave` varchar(50) NOT NULL default '0',
  `top_gross_eagles` varchar(50) default '0',
  `top_net_eagles` varchar(50) default '0',
  `top_gross_birdies` varchar(50) default '0',
  `top_net_birdies` varchar(50) default '0',
  `top_gross_pars` varchar(50) default '0',
  `top_net_pars` varchar(50) default '0',
  `top_gross_bogeys` varchar(50) default '0',
  `top_net_bogeys` varchar(50) default '0',
  `top_drive` varchar(50) default '0',
  `top_fairway_hit` varchar(50) default '0',
  `top_putts` varchar(50) default '0',
  `total_gross_eagles` varchar(4) default '0',
  `total_net_eagles` varchar(4) default '0',
  `total_gross_birdies` varchar(4) default '0',
  `total_net_birdies` varchar(4) default '0',
  `total_gross_pars` varchar(4) default '0',
  `total_net_pars` varchar(4) default '0',
  `total_gross_bogeys` varchar(4) default '0',
  `total_net_bogeys` varchar(4) default '0',
  `total_gross_others` varchar(4) default '0',
  `total_net_others` varchar(4) default '0',
  `par3avg_gross` float(3,2) default '0.00',
  `par3avg_net` float(3,2) default '0.00',
  `par4avg_gross` float(3,2) default '0.00',
  `par4avg_net` float(3,2) default '0.00',
  `par5avg_gross` float(3,2) default '0.00',
  `par5avg_net` float(3,2) default '0.00',
  PRIMARY KEY  (`Id`)
) TYPE=MyISAM AUTO_INCREMENT=46 ;

# --------------------------------------------------------

#
# Table structure for table `users_clubs`
#

CREATE TABLE `users_clubs` (
  `Id` int(6) unsigned NOT NULL auto_increment,
  `userid` varchar(20) default NULL,
  `driver` varchar(200) default 'NA',
  `woods` varchar(200) default 'NA',
  `irons` varchar(200) default 'NA',
  `putter` varchar(200) default 'NA',
  `ball` varchar(200) default 'NA',
  `bag` varchar(200) default 'NA',
  PRIMARY KEY  (`Id`)
) TYPE=MyISAM AUTO_INCREMENT=15 ;

# --------------------------------------------------------

#
# Table structure for table `users_tour`
#

CREATE TABLE `users_tour` (
  `ID` int(11) NOT NULL auto_increment,
  `userid` varchar(15) default NULL,
  `name` varchar(50) default NULL,
  `surname` varchar(50) NOT NULL default '',
  `password` varchar(20) NOT NULL default '',
  `login` varchar(50) NOT NULL default '',
  `handicap` int(2) NOT NULL default '0',
  `age` char(3) NOT NULL default '',
  `homeclub` varchar(50) NOT NULL default '',
  `email` varchar(50) NOT NULL default '',
  `phoneno` varchar(15) NOT NULL default '',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Usernames' AUTO_INCREMENT=29 ;
    

#
# Table structure for table `clubs`
#

CREATE TABLE `clubs` (
  `ID` int(11) NOT NULL auto_increment,
  `clubid` char(2) NOT NULL default '',
  `clubs` varchar(20) NOT NULL default '',
  `teeoff` int(2) NOT NULL default '0',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Clubs' AUTO_INCREMENT=20 ;

#
# Dumping data for table `clubs`
#

INSERT INTO `clubs` VALUES (1, 'lw', 'Lob', 13);
INSERT INTO `clubs` VALUES (2, 'sw', 'Sand', 12);
INSERT INTO `clubs` VALUES (3, 'pw', 'Pitching', 11);
INSERT INTO `clubs` VALUES (4, 'i9', '9 Iron', 10);
INSERT INTO `clubs` VALUES (5, 'i8', '8 Iron', 9);
INSERT INTO `clubs` VALUES (6, 'i7', '7 Iron', 8);
INSERT INTO `clubs` VALUES (7, 'i6', '6 Iron', 7);
INSERT INTO `clubs` VALUES (8, 'i5', '5 Iron', 6);
INSERT INTO `clubs` VALUES (9, 'i4', '4 Iron', 5);
INSERT INTO `clubs` VALUES (10, 'i3', '3 Iron', 4);
INSERT INTO `clubs` VALUES (11, 'i2', '2 Iron', 14);
INSERT INTO `clubs` VALUES (12, 'w9', '9 Wood', 17);
INSERT INTO `clubs` VALUES (13, 'w7', '7 Wood', 16);
INSERT INTO `clubs` VALUES (14, 'w5', '5 Wood', 3);
INSERT INTO `clubs` VALUES (15, 'w4', '4 Wood', 15);
INSERT INTO `clubs` VALUES (16, 'w3', '3 Wood', 2);
INSERT INTO `clubs` VALUES (17, 'w2', '2 Wood', 18);
INSERT INTO `clubs` VALUES (18, 'dr', 'Driver', 1);
INSERT INTO `clubs` VALUES (19, 'ut', 'Utility', 19);

# --------------------------------------------------------

#
# Table structure for table `stableford`
#

CREATE TABLE `stableford` (
  `ID` int(3) NOT NULL auto_increment,
  `score` varchar(20) NOT NULL default '',
  `points` int(2) NOT NULL default '0',
  PRIMARY KEY  (`ID`)
) TYPE=MyISAM COMMENT='Stableford' AUTO_INCREMENT=10 ;

#
# Dumping data for table `stableford`
#

INSERT INTO `stableford` VALUES (1, 'Hole_in_one', 4);
INSERT INTO `stableford` VALUES (2, 'Double_Eagle', 5);
INSERT INTO `stableford` VALUES (3, 'Eagle', 4);
INSERT INTO `stableford` VALUES (4, 'Birdie', 3);
INSERT INTO `stableford` VALUES (5, 'Par', 2);
INSERT INTO `stableford` VALUES (6, 'Bogey', 1);
INSERT INTO `stableford` VALUES (7, 'Double_Bogey', 0);
INSERT INTO `stableford` VALUES (8, 'Triple_Bogey', 0);
INSERT INTO `stableford` VALUES (9, 'Others', 0);
Return current item: GolfstatsPHP