Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. CREATE DATABASE `affiliate_test` ;
  2. use `affiliate_test`;
  3. CREATE TABLE `affiliate` (
    `id` INT UNSIGNED NOT NULL ,
    `name` VARCHAR( 100 ) NOT NULL ,
  4. `surname` VARCHAR( 100 ) NOT NULL ,
  5. `current_amount` DOUBLE NOT NULL ,
  6. `total_amount` DOUBLE NOT NULL ,
  7. PRIMARY KEY ( `id` )
  8. );
  9. CREATE TABLE `sold_item` (
    `id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
    `aff_id` INT NOT NULL ,
    `sold_amount` DOUBLE NOT NULL ,
    `aff_amount` DOUBLE NOT NULL ,
    `sold_date` VARCHAR( 50 ) NOT NULL ,
  10. `smonth` INT NOT NULL ,
  11. `syear` INT NOT NULL ,
  12. PRIMARY KEY ( `id` )
  13. );
  14. CREATE TABLE `inc_amount` (
    `id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
    `start_amount` INT NOT NULL ,
    `end_amount` INT NOT NULL ,
    `percentage` INT NOT NULL ,
    PRIMARY KEY ( `id` )
  15. );
  16. CREATE TABLE `aff_payment` (
    `id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
    `aff_id` INT NOT NULL ,
    `payment_date` VARCHAR( 50 ) NOT NULL ,
  17. `payment_amount` DOUBLE NOT NULL ,
  18. `smonth` INT NOT NULL ,
  19. `syear` INT NOT NULL ,
  20. PRIMARY KEY ( `id` )
  21. );
  22. CREATE TABLE `app_seq` (
    `last_num` INT NOT NULL );
  23. INSERT INTO `app_seq` ( `last_num` )
  24. VALUES (
    '1000');
  25. INSERT INTO `inc_amount` ( `id` , `start_amount` , `end_amount` , `percentage` )
  26. VALUES ('', '1', '1000', '3');
  27. INSERT INTO `inc_amount` ( `id` , `start_amount` , `end_amount` , `percentage` )
  28. VALUES ('', '1001', '2000', '4');
  29. INSERT INTO `inc_amount` ( `id` , `start_amount` , `end_amount` , `percentage` )
  30. VALUES ('', '2001', '3000', '5');
  31. INSERT INTO `inc_amount` ( `id` , `start_amount` , `end_amount` , `percentage` )
  32. VALUES ('', '3001', '4000', '6');
  33. INSERT INTO `inc_amount` ( `id` , `start_amount` , `end_amount` , `percentage` )
  34. VALUES ('', '4001', '5000', '7');
  35. ALTER TABLE `affiliate` ADD `address` VARCHAR( 250 ) NOT NULL ,
  36. ADD `city` VARCHAR( 100 ) NOT NULL ,
  37. ADD `postal_code` VARCHAR( 20 ) NOT NULL ,
  38. ADD `country` VARCHAR( 100 ) NOT NULL ,
  39. ADD `company_name` VARCHAR( 150 ) ,
  40. ADD `email` VARCHAR( 150 ) NOT NULL ,
  41. ADD `phone_number` VARCHAR( 30 ) NOT NULL ,
  42. ADD `web_site` VARCHAR( 100 ) ,
  43. ADD `recieve_special_offer` VARCHAR( 5 ) ,
  44. ADD `how_did_you_hear` VARCHAR( 100 ) ,
  45. ADD `accept_terms` VARCHAR( 5 ) NOT NULL ;
  46. CREATE TABLE `terms_of_service` (
    `terms` TEXT NOT NULL );
  47. CREATE TABLE `options_list` (
    `options` VARCHAR( 150 ) NOT NULL
  48. );
  49. INSERT INTO `options_list` ( `options` )
  50. VALUES ('Test'), ('Test 2');
  51. INSERT INTO `terms_of_service` ( `terms` )
  52. VALUES ('Test terms of service text, this text supports html tags. <b>This is a bold text</b>');




Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2017