abstract:•添加: INSERT INTO 表名 (字段列表) VALUES (值列表) ;INSERT INTO `user` (`name`, `sex`, `age`, `email`, `password`, `status`, `create_time`) VALUES('张无忌', 0
•添加: INSERT INTO 表名 (字段列表) VALUES (值列表) ;
INSERT INTO `user` (`name`, `sex`, `age`, `email`, `password`, `status`, `create_time`) VALUES
('张无忌', 0, 18, 'zwj@php.com', sha1(123456), 1, 1553599416);
•查询: SELECT 字段列表 FROM 表名 WHERE 查询条件 ORDER BY 排序条件 LIMIT 数量;
SELECT * FROM `user`; 查询所有
SELECT * FROM `user` WHERE `status` = 1 ORDER BY `age` LIMIT 2;
•更新: UPDATE 表名 SET 字段 = 值, ...... WHERE 更新条件;
UPDATE `user` SET `age` = 35 WHERE `id` = 4;
•删除: DELETE FROM 表名 WHERE 删除条件;
DELETE FROM `user` WHERE `id` = 4;
Correcting teacher:查无此人Correction time:2019-03-27 09:04:38
Teacher's summary:完成的不错,增删查改是最常用的。网站的数据操作都需要数据库,继续加油。