==================================================
                          A+ Download  - March 21, 2006
                 ==================================================
   
   
      
   Date Tables
   -----------
   1. filetable - stores the information about the files available for download
   
         itemnumber               varchar(40) not null,
         category                 varchar(40) not null,
         descriptive_filename     varchar(255),
         filename                 varchar(255) not null,
         filepath                 varchar(255),
         price                    float(7,2),
         filetype                 varchar(6),
         graphic_thumbnail        varchar(255),
         graphic_thumbnail_width  int,
         graphic_thumbnail_height int
   
         
   2. paypal_transactions - completed paypal transactions
   
         rec_id  int unsigned auto_increment not null primary key,
         txn_id          varchar(40) not null,
         orderdate       date not null,
         ordertime       time not null,
         first_name      varchar(64),
         last_name       varchar(64),
         address_street  varchar(200),
         address_city    varchar(40),
         address_state   varchar(40),
         address_zip     varchar(40),
         address_country varchar(64),
         address_country_code varchar(2),
         address_name    varchar(128),
         address_status  varchar(15),
         business        varchar(127),
         charset         varchar(100),
         custom          varchar(255),
         invoice         varchar(127),
         mc_currency     varchar(3),
         mc_fee          float(9,2),
         mc_gross        float(9,2),
         mc_handling     float(9,2),
         mc_shipping     float(9,2),
         exchange_rate   float(9,2),
         settle_amount   float(9,2),
         settle_currency varchar(3),
         notify_version  varchar(6),
         num_cart_items  int,
         payer_business_name varchar(127),
         payer_email     varchar(127),
         payer_id        varchar(13),
         payer_status    varchar(15),
         payment_date    varchar(40),
         payment_fee     float(9,2),
         payment_gross   float(9,2),
         payment_status  varchar(15),
         payment_type    varchar(15),
         pending_reason  varchar(20),
         reason_code     varchar(20),
         receiver_email  varchar(127),
         receiver_id     varchar(13),
         amt             float(9,2),
         cc              varchar(3),
         cm              varchar(255),
         residence_country varchar(2),
         st              varchar(40),
         tx              varchar(40),
         sig             blob,
         txn_type        varchar(15),
         verify_sign     varchar(255),
         item_number     varchar(127),
         item_name       varchar(127),
         quantity        int,
         item_cost       float(9,2),
         shipping        float(9,2),
         tax             float(9,2),
         handling        float(9,2),
         memo            varchar(255)

   
   3. invalid_paypal_transactions - incomplete paypal transactions
   
         rec_id  int unsigned auto_increment not null primary key,
         reason          varchar(255),
         txn_id          varchar(40) not null,
         orderdate       date not null,
         ordertime       time not null,
         first_name      varchar(64),
         last_name       varchar(64),
         address_street  varchar(200),
         address_city    varchar(40),
         address_state   varchar(40),
         address_zip     varchar(40),
         address_country varchar(64),
         address_country_code varchar(2),
         address_name    varchar(128),
         address_status  varchar(15),
         business        varchar(127),
         charset         varchar(100),
         custom          varchar(255),
         invoice         varchar(127),
         mc_currency     varchar(3),
         mc_fee          float(9,2),
         mc_gross        float(9,2),
         mc_handling     float(9,2),
         mc_shipping     float(9,2),
         exchange_rate   float(9,2),
         settle_amount   float(9,2),
         settle_currency varchar(3),
         notify_version  varchar(6),
         num_cart_items  int,
         payer_business_name varchar(127),
         payer_email     varchar(127),
         payer_id        varchar(13),
         payer_status    varchar(15),
         payment_date    varchar(40),
         payment_fee     float(9,2),
         payment_gross   float(9,2),
         payment_status  varchar(15),
         payment_type    varchar(15),
         pending_reason  varchar(20),
         reason_code     varchar(20),
         receiver_email  varchar(127),
         receiver_id     varchar(13),
         amt             float(9,2),
         cc              varchar(3),
         cm              varchar(255),
         residence_country varchar(2),
         st              varchar(40),
         tx              varchar(40),
         sig             blob,
         txn_type        varchar(15),
         verify_sign     varchar(255),
         item_number     varchar(127),
         item_name       varchar(127),
         quantity        int,
         item_cost       float(9,2),
         shipping        float(9,2),
         tax             float(9,2),
         handling        float(9,2),
         memo            varchar(255)
   
   
   4. category - category table
   
         category        varchar(40) not null,
         category_desc   varchar(255),
         category_image  varchar(100),
         sort            int
         
         
   5. report_temp - temporary data table used for report generation
   
         totalearned          float(9,2), 
         item_number          varchar(40),
         quantity             int,
         filename             varchar(255),
         descriptive_filename varchar(255),
         cost                 float(9,2) 
         
         
   6. downloads - downloads file
   
         rec_id  int unsigned auto_increment not null primary key,
         payer_email          varchar(127),  
         txn_id               varchar(40),
         item_number          varchar(40),
         filepath             varchar(255),
         filename             varchar(255),
         filetype             varchar(6),
         descriptive_filename varchar(255),
         attempt_number       int,
         download_date        date,
         download_time        time,
         unixtime             int,
         last_attempt_date    date,
         last_attempt_time    time,
         lastunixtime         int,
         ipfootprint          varchar(255)
   
         
   6. transactions - tracks the transactions for the login page to download the files
         
         txn_id               varchar(40),
         payer_email          varchar(127),
         uniqueid             varchar(20),
         unixtime             int