-- 主機: 127.0.0.1
-- 產生時間: 2021-02-03 16:29:37
-- 伺服器版本: 10.4.13-MariaDB
-- PHP 版本: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
/!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/!40101 SET NAMES utf8mb4 */;
cart_system
cart
Create database cart_system
CREATE TABLE cart
(id
int(11) NOT NULL,product_name
varchar(100) NOT NULL,product_price
varchar(50) NOT NULL,product_image
varchar(255) NOT NULL,qty
int(10) NOT NULL,total_price
varchar(100) NOT NULL,product_code
varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
cart
INSERT INTO cart
(id
, product_name
, product_price
, product_image
, qty
, total_price
, product_code
) VALUES
(77, '小米 紅米 Note 8T 64GB', '4490', 'img/Xiaomi_xiaomi_redmi_note_8t_1127062027535_640x480.jpg', 2, '8980', 'p1000'),
(78, 'Sony Xperia 10 II', '11490', 'img/Sony_sony_xperia_10_mark_two_0514061614733_640x480.jpg', 2, '22980', 'p1004'),
(79, 'HTC Desire 20 pro', '7390', 'img/hTC_htc_desire_20_pro_0619112619118_640x480.jpg', 1, '7390', 'p1001');
orders
CREATE TABLE orders
(id
int(11) NOT NULL,name
varchar(100) NOT NULL,email
varchar(100) NOT NULL,phone
varchar(20) NOT NULL,address
varchar(255) NOT NULL,pmode
varchar(50) NOT NULL,products
varchar(255) NOT NULL,amount_paid
varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
orders
INSERT INTO orders
(id
, name
, email
, phone
, address
, pmode
, products
, amount_paid
) VALUES
(0, 'Jean Wu', 'teajean@gmail.com', '0975586395', '高雄市鳳山區文樂街22號\r\n', 'Cash', 'HTC Desire 20 pro(1)Apple iPhone 11 128GB(1)小米 紅米 Note 8T 64GB(1)Sony Xperia 10 II(2)', '58360'),
(0, 'Jean Wu', 'teajean@gmail.com', '0975586395', 'kzohsiung', 'ATM', 'HTC Desire 20 pro(1)Apple iPhone 11 128GB(1)小米 紅米 Note 8T 64GB(1)Sony Xperia 10 II(2)', '58360');
product
CREATE TABLE product
(id
int(11) NOT NULL,product_name
varchar(100) NOT NULL,product_price
varchar(50) NOT NULL,product_image
varchar(255) NOT NULL,product_code
varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
product
INSERT INTO product
(id
, product_name
, product_price
, product_image
, product_code
) VALUES
(1, '小米 紅米 Note 8T 64GB', '4490', 'img/Xiaomi_xiaomi_redmi_note_8t_1127062027535_640x480.jpg', 'p1000'),
(2, 'HTC Desire 20 pro', '7390', 'img/hTC_htc_desire_20_pro_0619112619118_640x480.jpg', 'p1001'),
(3, 'Apple iPhone 11 128GB', '23500', 'img/Apple_apple_iphone_11_0910202110539_640x480.jpg', 'p1002'),
(4, 'ASUS ZenFone 6 ', '15100', 'img/ASUS_asus_zenfone_6_zs630kl_0516185616105_640x480.jpg', 'p1003'),
(5, 'Sony Xperia 10 II', '11490', 'img/Sony_sony_xperia_10_mark_two_0514061614733_640x480.jpg', 'p1004'),
(6, 'HUAWEI Mate 20 Pro ', '13500', 'img/HUAWEI_huawei_mate_20_pro_1029151929242_640x480.jpg', 'p1006'),
(7, 'SAMSUNG Galaxy A71', '35000', 'img/SAMSUNG_samsung_galaxy_a71_1213060513825_640x480.jpg', 'p1006');
cart
ALTER TABLE cart
ADD PRIMARY KEY (id
);
product
ALTER TABLE product
ADD PRIMARY KEY (id
);
cart
ALTER TABLE cart
MODIFY id
int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=80;
product
ALTER TABLE product
MODIFY id
int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT /;
/!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
/!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
'''