Plastic in The Ocean

Create Table SQL

     CREATE TABLE tblAnimals(
        pmkAnimalsId INT AUTO_INCREMENT PRIMARY KEY,
        fldAnimal varchar(30),
        fldAffect varchar(200),
        fldEndangered varchar(10)
     );   
 

Populate table with data

     INSERT INTO tblAnimals
     (fldAnimal, fldEffect, fldEndangered)
     VALUES

     ('Turtles', 'Over 1000 die every year', 'Yes'),

     ('Whale Sharks', 'Plastic piles up in the stomach and prevents nutrient intake', 'Yes'),

     ('Seagulls', 'Plastic may puncture organs', 'No');
     

Select Data for Display

     SELECT fldAnimal, fldEffect, fldEndangered FROM tblAnimals
      

Create form table

    CREATE TABLE tblPlasticSurvey(
    pmkPlasticSurveyId INT AUTO_INCREMENT PRIMARY KEY,
    fldFirstName VARCHAR(20),
    fldLastName VARCHAR(20),
    fldEmail VARCHAR(50),
    fldAge VARCHAR(5),
    fldPaperBags TINYINT(1),
    fldClothBags TINYINT(1),
    fldReuseWaterBottles TINYINT(1),
    fldFavOrganization VARCHAR(25),
    fldComments TEXT
    )
    

Insert data into form table

        INSERT INTO tblPlasticSurvey(
            fldFirstName, fldLastName, fldEmail, fldAge, fldPaperBags, fldClothBags, fldReuseWaterBottles, fldFavOrganization, fldComments)
        VALUES(
            'India', 'Davis', 'idavis1@uvm.edu', '18-30', '1', '1', '1', 'Plastic Pollution Coalition', 'none')