Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Account Group --
- DROP TABLE IF EXISTS `account_group`;
- CREATE TABLE IF NOT EXISTS `account_group` (
- `group_id` int(11) unsigned NOT NULL auto_increment,
- `title` varchar(30) NOT NULL default '',
- `is_staff` mediumint(9) unsigned NOT NULL default '0',
- `permission` mediumint(9) unsigned NOT NULL default '0',
- PRIMARY KEY (`group_id`)
- ) ENGINE=MyISAM AUTO_INCREMENT=0;
- -- Predefined Account Group --
- INSERT INTO `account_group` ( `title`,`is_staff`,`permission` ) VALUES
- ( 'Administrator', 1, 0 ),
- ( 'Validating', 0, 0 ),
- ( 'Member', 0, 0 ),
- ( 'Banned', 0, 0 ),
- ( 'Staff', 1, 0 );
- -- Login Table --
- DROP TABLE IF EXISTS `account`;
- CREATE TABLE IF NOT EXISTS `account` (
- `account_id` int(11) unsigned NOT NULL auto_increment,
- `user_id` varchar(30) NOT NULL default '',
- `user_pass` varchar(35) NOT NULL default '',
- `name` varchar(35) NOT NULL default '',
- `sex` enum('M','F','null') NOT NULL default 'null',
- `email` varchar(30) NOT NULL default '',
- `phone` varchar(10) NOT NULL default '',
- `ic_number` varchar(14) NOT NULL default '',
- `group_id` int(11) unsigned NOT NULL default '0',
- `logincount` mediumint(9) unsigned NOT NULL default '0',
- `online` tinyint(1) unsigned NOT NULL default '0',
- `session` int(11) unsigned NOT NULL default '0',
- `currency` int(11) unsigned NOT NULL default '1',
- `register_ip` varchar(30) NOT NULL default '0.0.0.0',
- `register_time` datetime NOT NULL default '0000-00-00 00:00:00',
- `last_ip` varchar(30) NOT NULL default '0.0.0.0',
- `last_login` datetime NOT NULL default '0000-00-00 00:00:00',
- PRIMARY KEY (`account_id`),
- KEY (`user_id`),
- UNIQUE (`user_id`),
- UNIQUE (`name`),
- FOREIGN KEY (`group_id`) REFERENCES account_group(`group_id`)
- ) ENGINE=MyISAM AUTO_INCREMENT=10000000;
- -- Predefined Account --
- INSERT INTO `account` ( `user_id`,`user_pass`,`name`,`sex`,`email`,`group_id`,`register_time` ) VALUES
- ( 'admin','21232f297a57a5a743894a0e4a801fc3','admin','M','[email protected]',1,NOW() ),
- ( 'member','aa08769cdcb26674c6706093503ff0a3','member','M','[email protected]',3,NOW() );
- -- Brand Table --
- DROP TABLE IF EXISTS `brand`;
- CREATE TABLE IF NOT EXISTS `brand` (
- `brand_id` int(11) unsigned NOT NULL auto_increment,
- `brand_name` varchar(30) NOT NULL default '',
- `caption` text,
- `image_path` varchar(50) NOT NULL default '',
- PRIMARY KEY (`brand_id`)
- ) ENGINE=MyISAM AUTO_INCREMENT=1;
- -- Predefined Account --
- INSERT INTO `brand` ( `brand_name`,`caption`,`image_path` ) VALUES
- ( 'Rolex','Rolex is the single largest luxury watch company, retailing in over 100 countries and producing an average of 2,000 watches per day.','brand/rolex.jpg' ),
- ( 'DKNY','DKNY watches reflect the modern, urban feel of DKNY jeans, and feature classic colors, creative shapes and use of materials, and plenty of sparkle.','brand/dkny.jpg' ),
- ( 'Rado','Rado watch is equipped with sapphire crystal, exceptionally hard bracelet and case materials, and the highest quality gemstones available.','brand/rado.jpg' ),
- ( 'Breitlings','Breitlings are marked by impeccable movements, clear, readable dials, superior water resistance, and sturdy, comfortable bracelets. They are truly the "instruments for professionals."','brand/breitling.jpg' );
- -- Product Table --
- DROP TABLE IF EXISTS `product`;
- CREATE TABLE IF NOT EXISTS `product` (
- `product_id` int(11) unsigned NOT NULL auto_increment,
- `product_name` varchar(30) NOT NULL default '',
- `product_brand` int(11) unsigned NOT NULL default '0',
- `product_desc` text,
- `price` DECIMAL(18,2) NOT NULL default '0.00',
- `image_set_id` int(11) unsigned default '0',
- PRIMARY KEY (`product_id`),
- FOREIGN KEY (`product_brand`) REFERENCES `brand`(`brand_id`)
- ) ENGINE=MyISAM AUTO_INCREMENT=1;
- -- Predefined Account --
- INSERT INTO `product` ( `product_name`,`product_brand`,`product_desc`,`price` ) VALUES
- ( 'COSMOGRAPH DAYTONA',1,'A new prestigious version of the Oyster Perpetual Cosmograph Daytona, the emblematic model launched in 1963, exactly 50 years ago this year.',1369.85 ),
- ( 'DAY-DATE',1,'The new Oyster Perpetual Day-Date collection in 18 ct yellow, white or Everose gold features luxurious colourful leather straps and matching dials.',8691.26 ),
- ( 'DAY-DATE "SERTIE"',1,'Rolex is honouring the art of dial making and traditional gem setting with a selection of new Oyster Perpetual Day-Date models in gold graced with diamonds, mother-of-pearl and fine coloured gemstones. The new Day-Date models have distinctive, sophisticated dials conceived and produced in-house by Rolex dial makers. All the bezels are set with baguette-cut diamonds.',5361.38 ),
- ( 'GMT-MASTER II',1,'The new Oyster Perpetual GMT-Master II is presented in 904L steel, with a rotatable bezel featuring for the first time a two-colour ceramic Cerachrom bezel insert in blue and black representing day and night.',1665.38 ),
- ( 'LADY-DATEJUST PEARL',1,'This new version of the Oyster Perpetual Lady-Datejust Pearlmaster combines the most precious materials with a splendid gem setting. The case and bracelet in 18 ct Everose gold, created by Rolex in its own foundry, are graced with a bezel and bracelet links in 18 ct white gold exquisitely set with sparkling diamonds.',9827.90 ),
- ( 'LADY-DATEJUST PEARL II',1,'This new version of the Oyster Perpetual Lady-Datejust Pearlmaster combines the most precious materials with a splendid gem setting. The case and bracelet in 18 ct Everose gold, created by Rolex in its own foundry, are graced with a bezel and bracelet links in 18 ct white gold exquisitely set with sparkling diamonds.',1369.85 ),
- ( 'YACHT-MASTER II',1,'Rolex revolutionary regatta chronograph, launched in 2007, is now available for the first time in 904L steel, fitted with a Cerachrom bezel insert in blue ceramic.',8691.26 ),
- ( 'DATEJUST 36 MM',1,'In a glamorous 36 mm size, a timepiece for those seeking classic elegance.',5361.38 ),
- ( 'DATEJUST II',1,'The Oyster Perpetual Datejust II has the charisma and majesty of a classic revisited.',1665.38 ),
- ( 'DATEJUST LADY 31',1,'A daring contrast of materials, colours and motifs in an intermediate size.',9827.90 ),
- ( 'DATEJUST',1,'The Oyster Perpetual Datejust is the watch of reference for those who believe that elegance is timeless.',1369.85 ),
- ( 'DAY-DATE II',1,'The Oyster Perpetual Day-Date II embodies Rolex prestige and excellence.',8691.26 ),
- ( 'EXPLORER II',1,'The Oyster Perpetual Explorer II is the watch of choice when adventure is second nature.',5361.38 ),
- ( 'EXPLORER',1,'The Oyster Perpetual Explorer embodies the spirit of adventure and the perseverance that lies behind every exploit.',1665.38 ),
- ( 'MILGAUSS',1,'The Oyster Perpetual Milgauss, the watch for those with a passion for the worlds of science and discovery, reconciles strong magnetic fields and chronometric precision.',9827.90 ),
- ( 'ROLEX DEEPSEA',1,'The Oyster Perpetual Rolex Deepsea is the ultimate reference chosen by professional divers in oceans around the world. A new-generation divers’ watch steeped in decades of experience.',1369.85 ),
- ( 'SKY-DWELLER',1,'For those who travel the world... The first Rolex with two time zones and an innovative annual calendar that marks the passage of the months.',8691.26 ),
- ( 'SUBMARINER DATE',1,'The Oyster Perpetual Submariner, the archetype of the diver’s watch, epitomizes the pioneering link between Rolex and the underwater world.',5361.38 ),
- ( 'DATEJUST SPECIAL',1,'Marrying high craftsmanship to the art of timekeeping, the Datejust Special Edition is a sumptuous incarnation of a feminine classic.',1665.38 ),
- ( 'COSMOGRAPH DAYTONA',1,'The iconic benchmark for those with a passion for driving, high performance and fine engineering.',9827.90 ),
- ( 'ROSE GOLD ROUND WATCH',2,'This watch offers 3 hand movement on a glossy-finish dial. Features include strap buckle closure, 20 MM Lug Width, 38 MM Case Size and a bracelet inner circumference of 190 MM.',4535.20 ),
- ( 'REDSPORT ROUND WATCH',2,'This watch offers 3 hand movement on a matte and glossy-finish dial. Features include strap buckle closure, 20 MM Lug Width, 38 MM Case Size and a bracelet inner circumference of 190 MM.',2314.11 ),
- ( 'ROUND STEEL BRACELET WATCH',2,'This watch offers 3 hand movement on a glossy-finish dial with stainless steel accents on every hour. Features include deployant buckle closure, 16 MM Lug Width, 32 MM Case Size and a bracelet inner circumference of 175 MM.',3191.96 ),
- ( 'POLISHED SILVER WATCH',2,'A classic style in a cool ceramic material that will add a hint of glam to any outfit. Features white round face and glitz detail.',8445.69 ),
- ( 'PURPLE LEATHER SKINNY WATCH',2,'This watch offers 3 hand movement on a sunray dial with stainless steel accents on the hours. Features include strap buckle closure, 8 MM Lug Width, 28 MM Case Size and a bracelet inner circumference of 175 MM.',2826.38 ),
- ( 'RED LEATHER SKINNY WATCH',2,'This watch offers 3 hand movement on a sunray dial with stainless steel accents on the hours. Features include strap buckle closure, 8 MM Lug Width, 28 MM Case Size and a bracelet inner circumference of 175 MM.',4535.20 ),
- ( 'WHITE LEATHER SKINNYWATCH',2,'This watch offers 3 hand movement on a sunray dial with stainless steel accents on the hours. Features include strap buckle closure, 8 MM Lug Width, 28 MM Case Size and a bracelet inner circumference of 175 MM.',2314.11 ),
- ( 'RED PY-W-STRAP WATCH',2,'This watch offers 3 hand movement on a Mother of Pearl dial with stainless steel accents on the hours. Features include strap-buckle closure, 18 MM Lug Width, 36 MM Case Size, 12 clear crystals on case, and a bracelet inner circumference of 190 MM.',3191.96 ),
- ( 'PINK PY-W-STRAP WATCH',2,'This watch offers 3 hand movement on a Mother of Pearl dial with stainless steel accents on the hours. Features include strap-buckle closure, 18 MM Lug Width, 36 MM Case Size, 12 clear crystals on case, and a bracelet inner circumference of 190 MM.',8445.69 ),
- ( 'BEIGE PY-W-STRAP WATCH',2,'This watch offers 3 hand movement on a Mother of Pearl dial with stainless steel accents on the hours. Features include strap-buckle closure, 18 MM Lug Width, 36 MM Case Size, 12 clear crystals on case, and a bracelet inner circumference of 190 MM.',2826.38 ),
- ( 'WHITE PY-W-STRAP WATCH',2,'This watch offers 3 hand movement on a Mother of Pearl dial with stainless steel accents on the hours. Features include strap-buckle closure, 18 MM Lug Width, 36 MM Case Size, 12 clear crystals on case, and a bracelet inner circumference of 190 MM.',4535.20 ),
- ( 'CERAMIC BLACK CHRONO',2,'Black ceramic chronograph watch features a round face and stainless steel details. Case size 38MM. Case thickness 11.8MM.',2314.11 ),
- ( 'STAINLESS MESH BRACELET',2,'Brushed Stainless Steel mesh bracelet with Silver sunray dial finish. Case size 28.1mm. Case thickness 8.5mm.',3191.96 ),
- ( 'TWO TONE BRACELET WATCH',2,'This watch offers 3 hand movement on a sunray dial with rose gold accents on every quarter hour. Features include deployant buckle closure, 14 MM Lug Width, 28 MM x 23 MM Case Size and a bracelet inner circumference of 175 MM.',8445.69 ),
- ( 'WHITE LEATHER GOLD WATCH',2,'This watch offers 3 hand movement on a sunray dial with rose gold-tone IP accents on the hours. Features include strap buckle closure, 8MM Lug Width, 28 MM Case Size and a bracelet inner circumference of 175 MM.',2826.38 ),
- ( 'ROUND STEEL BRACELET WATCH',2,'This watch offers 3 hand movement on a glossy-finish dial with stainless steel accents. Features include deployant buckle closure, 16 MM Lug Width, 32 MM Case Size and a bracelet inner circumference of 175 MM.',4535.20 ),
- ( 'RED PYTHON NARROW WATCH',2,'This watch offers 3 hand movement on a sunray dial with stainless steel accents on every quarter hour. Features include strap buckle closure, 14 MM Lug Width, 28 MM x 23 MM Case Size and a bracelet inner circumference of 175 MM.',2314.11 ),
- ( 'BEIGE CERAMIC ROUND WATCH',2,'This watch offers Chronograph movement on a glossy-finish dial. Features include deployant buckle closure, 48 Clear Crystals on Case, 18 MM Lug Width, 38 MM Case Size and a bracelet inner circumference of 190 MM.',3191.96 ),
- ( 'ROSE CERAMIC ROUND WATCH',2,'This watch offers Chronograph movement on a glossy-finish dial. Features include deployant buckle closure, 48 Clear Crystals on Case, 18 MM Lug Width, 38 MM Case Size and a bracelet inner circumference of 190 MM.',8445.69 ),
- ( 'ROSE SMALL BRACELET WATCH',2,'This watch offers 3 hand movement on a sunray dial with rose gold accents on the hours. Features include AOM Links closure, 8 MM Lug Width, 28 MM Case Size and a bracelet inner circumference of 175 MM.',2826.38 ),
- ( 'PINK PYTHON NARROW WATCH',2,'This watch offers 3 hand movement on a sunray dial with stainless steel accents on every quarter hour. Features include strap buckle closure, 14 MM Lug Width, 28 MM x 23 MM Case Size and a bracelet inner circumference of 175 MM.',4535.20 ),
- ( 'CORAL ENAMEL BANGLE WATCH',2,'Coral enamel rectangle bangle watch in polished stainless steel and polished coral enamel. 33mm x 13mm and 8mm thick. Coral glossy dial color and 2 hands.',9131.44 ),
- ( 'WHITE BANGLE WATCH',2,'White enamel rectangle bangle watch in polished stainless steel and polished white enamel. 33mm x 13mm and 8mm thick. White glossy dial color and 2 hands.',9471.14 ),
- ( 'FUSCHIA BANGLE WATCH',2,'Fuschia enamel rectangle bangle watch in polished stainless steel and polished fuschia enamel. 33mm x 13mm and 8mm thick. Fuschia glossy dial color and 2 hands.',3861.34 ),
- ( 'BLUE RECTANGLE BANGLE WATCH',2,'Blue enamel rectangle bangle watch in polished stainless steel and polished blue enamel. 33mm x 13mm and 8mm thick. Blue glossy dial color and 2 hands.',9572.81 ),
- ( 'RADO JOAILLERIE',3,'Precious stones and lustrous metals mingle with high-tech materials. The impact is luxurious and lasting.',3579.33 ),
- ( 'RADO ESENZA',3,'The sapphire crystal dome of the Rado eSenza is at the service of pure simplicity and elegance. Its sleek oval form is a refined expression of technology enveloped in feminine charm.',9131.44 ),
- ( 'RADO CERAMICA',3,'With seven additional digital LCD functions including day, date and alarm, this watch will ensure you’re always ahead of the game.',9471.14 ),
- ( 'RADO INTEGRAL',3,'Produced in series in 1986, the Rado Integral was the first Rado watch where high-tech ceramic was used. A revolution in the watchmaking industry, it fuses the purity of graphic linearity with the finesse of high technology. The edge-to-edge metallised sapphire crystal, case and bracelet form clean parallel lines.',3861.34 ),
- ( 'RADO SINTRA',3,'Inside this watch case beats a mechanical heart. Self-winding, it follows its wearer, harnessing the energy produced through the day.',9572.81 ),
- ( 'RADO SPECCHIO',3,'Named after the Italian for “mirror”, this watch is a reflection of material and technical leadership. A case of contrasting materials and a playful approach to shaping make for an eye-catching piece.',3579.33 ),
- ( 'RADO V10K',3,'The product of a ten-year quest, this watch concentrates the latest technology into unsurpassed design purity. In transforming carbon elements into millions of nano-diamond particles, Rado has harnessed the wonders of science to empower beauty.',9131.44 ),
- ( 'RADO D-STAR',3,'The wearer’s own movements power this self-winding automatic Rado. The chronograph movement offers an added dimension whilst retaining all the design prowess of the Rado D-Star.',9471.14 ),
- ( 'RADO D-STAR 200',3,'These style landmarks boast water resistance to a pressure of 20 bar. Modernity welcomes the sporty mood in a watch that complements wet suits and business suits alike.',3861.34 ),
- ( 'RADO NEW ORIGINAL',3,'Rejuvenating its cult watch with great dexterity, Rado remains loyal to a fundamental principle: staying ahead of the times. Rado New Original combines understated and timeless design with the most sophisticated high performance materials.',9572.81 ),
- ( 'RADO ORIGINAL',3,'Five decades ago, Rado revolutionised watchmaking with the world’s first scratch-resistant watch. Today the Rado Original incorporates its ancestor’s bold and ageless appeal as only a true classic can, bearing the distinctive signature of an impressive hardmetal surface.',3579.33 ),
- ( 'RADO HYPERCHROME',3,'Reaching new summits of technical complexity, a one piece or "monobloc" case forms the entire structure of the timepiece. Contrasting parentheses protect and underline its uniqueness.',9131.44 ),
- ( 'RADO CENTRIX',3,'Inside this watch case beats a mechanical heart. Self-winding, it follows its wearer, taking the power and energy produced through the day.',9471.14 ),
- ( 'RADO TRUE',3,'A multi-step production process contrasts with the simplicity of the perfectly round shape, transforming sophistication into comfort.',3861.34 ),
- ( 'RADO R5.5',3,'The bold symmetry of Morrison’s design is wedded to Rado’s pioneering fusion of materials and technology. Fashioned entirely from high-tech ceramic, the case and bracelet of the Rado r5.5 – named after its 5.5 cm corner radii – form a seamless, organic whole.',9572.81 ),
- ( 'RADO R-ONE',3,'A Limited Edition that propels watch design well out of the orbit of tradition and convention. Innovative materials and outstanding design make this timepiece a must have for watch enthusiasts.',3579.33 ),
- ( 'CHRONOMAT 41',4,'Elegance. Performance. Precision. The Chronomat 41 combines an exceptional fuselage with the selfwinding chronograph Manufacture Caliber 01 “motor”, chrono-meter-certified by the COSC – as indeed are all Breitling movements. The 41 mm diameter of its sleekly curved case makes it suitable for all wrist sizes. It is equipped with a screw-locked crown and pushpieces as well as substantial protective control guards. The Chronomat 41 is available in steel, steel & rose gold or rose gold versions with a broad choice of dials and straps or bracelets.',4959.55 ),
- ( 'CHRONOMAT 44',4,'The undisputed star of the Breitling collections, the Chronomat 44 reflects a universe dedicated to performance, sporting feats and surpassing personal limits. The case housing the Manufacture Breitling Caliber 01 is water-resistant to a depth of 500 meters (1,650 ft) – a feat worthy of an authentic diver’s watch. The epitome of authentic class and elegance, this chronograph with its unique style embodies the perfect watch for all circumstances – from intensive sport to sophisticated night life. It comes in a choice of four versions: all-steel, steel with a bezel bearing four solid gold markers, steel with gold bezel, or all-gold.',7465.28 ),
- ( 'CHRONOMAT 44 GMT',4,'With the Chronomat 44 GMT, Breitling offers a travel watch boasting unprecedented user friendliness. The wearer need only pull out the crown and turn it either backwards or forwards to move between timezones without losing any precision in the minutes display. Equipped with the Manufacture Breitling Caliber B04, this model is one of the rare chronographs to offer such a smoothly functional dual timezone system. It is also distinguished by its rotating bezel serving to provide a 24-hour third timezone reading.',3457.1 ),
- ( 'CHRONOMAT 44 FLYING FISH',4,'Herbert Nitsch, nicknamed the “Flying Fish” and the only freediver to have reached the fabulous depth of 700 feet, has found a chronograph to match his accomplishments in this special series of the Chronomat 44 featuring an all-black dial and a steel case with exclusive finishing. This ideal companion for all manner of feats is water- resistant to 500 m (1,650 ft), as highlighted by the red inscription on the dial. The watch of the extreme record breaker.',3448.97 ),
- ( 'CHRONOMAT GMT',4,'With its ultra-practical and innovative dual timezone system, the Chronomat GMT has established itself as the authentic travel chronograph. Breitling also offers it in a 2,000-piece limited series with a bidirectional rotating bezel providing a 24-hour third timezone reading, and contrasted finishes underscoring the power and elegance of the design. A sapphire crystal caseback provides an admirable view of Manufacture Breitling Caliber B04, entirely developed and produced in the Breitling workshops.',5184.11 ),
- ( 'CHRONOMAT BLACKBIRD',4,'The Chronomat Blackbird special series makes a noteworthy comeback with a 2,000-piece limited edition featuring a case with satin-brushed finishes and a “compass” rotating bezel with polished rider tabs. The famous Blackbird black dial guaranteeing excellent readability is distinguished by its large double-window date display. This selfwinding model is also available with a Co-Pilot electronic auxiliary module enabling smooth and fast handling of all flight times.',4959.55 ),
- ( 'NAVITIMER 01',4,'The favorite watch of pilots and dedicated aviation fans laid a major milestone in its history by taking aboard Manufacture Breitling Caliber 01 – a paragon of reliability and performance. This Navitimer 01 is distinguished by its black dial with a red seconds hand and applied hour-markers or numerals. To celebrate the 60th anniversary of this legendary model – one of the ten great 20th century watchmaking classics – Breitling has also created two limited series with blue or silver dials and a transparent sapphire crystal caseback.',7465.28 ),
- ( 'NAVITIMER WORLD',4,'Ever ready for takeoff, the Navitimer World travel watch is distinguished by its extremely practical and easily readable dual timezone system. A red-tipped additional central hand displays the time in another part of the globe on a 24-hour scale – thus indicating whether it is day or night in the relevant location. The selfwinding chronograph movement is protected by a large case available in steel. The caseback is engraved with the timezones of the world’s major cities.',3457.1 ),
- ( 'NAVITIMER COSMONAUTE',4,'On May 24th 1962, Scott Carpenter orbited the Earth three times aboard the Aurora 7 capsule. On his wrist was a Navitimer with a 24-hour graduation – a vital necessity in distinguishing day from night. It thus became the first wrist chronograph to travel in space. To celebrate the 50th anniversary of this pioneer in the sphere of space conquest, Breitling set into orbit a new Navitimer Cosmonaute model with a 100% in-house movement. This 1,962-piece limited series is distinguished by its 24-hour display, its manual winding – two tributes to the original 1962 chronograph – as well as the Aurora 7 insignia engraved on the caseback.',3448.97 ),
- ( 'NAVITIMER 1461',4,'Issued in a 1,000-piece steel limited edition, this Grande Complication Navitimer chronograph combines the famous circular aviation slide rule with a “leap-year calendar” requiring correction only once every four years – meaning 1,461 days. The ultra-sophisticated movement comprises over 450 parts. The date, day and month are displayed on three subdials complemented by a moon-phase aperture standing out against the blue background.',5184.11 );
- -- Wishlist Table --
- DROP TABLE IF EXISTS `wishlist`;
- CREATE TABLE IF NOT EXISTS `wishlist` (
- `wishlist_id` int(11) unsigned NOT NULL auto_increment,
- `account_id` int(11) unsigned NOT NULL default '0',
- `product_id` int(11) unsigned NOT NULL default '0',
- PRIMARY KEY (`wishlist_id`),
- FOREIGN KEY (`product_id`) REFERENCES `product`(`product_id`),
- FOREIGN KEY (`account_id`) REFERENCES `account`(`account_id`)
- ) ENGINE=MyISAM AUTO_INCREMENT=1;
- -- Cart Table --
- DROP TABLE IF EXISTS `cart`;
- CREATE TABLE IF NOT EXISTS `cart` (
- `account_id` int(11) unsigned NOT NULL default '0',
- `product_id` int(11) unsigned NOT NULL default '0',
- `quantity` int(11) unsigned NOT NULL default '1',
- PRIMARY KEY (`account_id`,`product_id`),
- FOREIGN KEY (`account_id`) REFERENCES `account`(`account_id`),
- FOREIGN KEY (`product_id`) REFERENCES `product`(`product_id`)
- ) ENGINE=MyISAM;
- -- Account Log Table --
- DROP TABLE IF EXISTS `account_log`;
- CREATE TABLE IF NOT EXISTS `account_log` (
- `log_id` int(11) unsigned NOT NULL auto_increment,
- `account_id` int(11) unsigned NOT NULL default '0',
- `activity` text,
- `query` text,
- `log_time` datetime NOT NULL default '0000-00-00 00:00:00',
- `current_ip` varchar(30) NOT NULL default '0.0.0.0',
- PRIMARY KEY (`log_id`),
- FOREIGN KEY (`account_id`) REFERENCES `account`(`account_id`)
- ) ENGINE=MyISAM AUTO_INCREMENT=1;
- -- Inbox Topic Table --
- DROP TABLE IF EXISTS `inbox_topic`;
- CREATE TABLE IF NOT EXISTS `inbox_topic` (
- `inbox_id` int(11) unsigned NOT NULL default '0',
- `sender_name` varchar(35) NOT NULL default '',
- `receiver_list` varchar(255) NOT NULL default '',
- `title` varchar(40) NOT NULL default '',
- `last_update` datetime NOT NULL default '0000-00-00 00:00:00',
- `last_read` datetime NOT NULL default '0000-00-00 00:00:00',
- PRIMARY KEY (`inbox_id`),
- FOREIGN KEY (`sender_name`) REFERENCES `account`(`name`)
- ) ENGINE=MyISAM;
- -- Inbox Post Table --
- DROP TABLE IF EXISTS `inbox_post`;
- CREATE TABLE IF NOT EXISTS `inbox_post` (
- `post_id` int(11) unsigned NOT NULL auto_increment,
- `inbox_id` int(11) unsigned NOT NULL default '0',
- `sender_name` varchar(35) NOT NULL default '',
- `message` text,
- `last_post` datetime NOT NULL default '0000-00-00 00:00:00',
- PRIMARY KEY (`post_id`),
- FOREIGN KEY (`inbox_id`) REFERENCES `inbox_topic`(`inbox_id`),
- FOREIGN KEY (`sender_name`) REFERENCES `account`(`name`)
- ) ENGINE=MyISAM AUTO_INCREMENT=1;
Advertisement
Add Comment
Please, Sign In to add comment