title: wordpress plugin sql setup
body: <p>I have set up four additional tables for my plugin to use what I am trying to do is take a name and assign it a ID then use this data to populate drop down menus with a name and the same for class and position I am unsure as to how to do this correctly this is what i have so far.</p>
  
  <pre><code>$sql = "CREATE TABLE $tableName (
    recordID int NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(recordID),
    driverID int,
    driverName varchar(30),
    classID int,
    driverClass varchar(20),
    posID,
    driverPosition varchar(6),
    trackName varchar(30),
    raceDate date
  );";
  
  $sql = "CREATE TABLE $driverTableName (
    driverID int NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(driverID),
    driverName varchar(30)
  
  );";
  
  $sql = "CREATE TABLE $classTableName (
    classID int NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(classID),
    className varchar (20)
  
  );";
  
  $sql = "CREATE TABLE $posTableName (
    posID int NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(posID),
    posName varchar(6)
  
  );";
  </code></pre>
  
  <p>The bottom three tables will store the data I want to populate the drop down boxes to create a record with I am unsure as to how to link them to the top table where this record will be stored.</p>