diff --git "a/\350\214\203\351\233\250\346\232\204/20220523-php\346\225\260\346\215\256\345\272\223\350\277\236\346\216\245.md" "b/\350\214\203\351\233\250\346\232\204/20220523-php\346\225\260\346\215\256\345\272\223\350\277\236\346\216\245.md" new file mode 100644 index 0000000000000000000000000000000000000000..dd8cde5ad45ffc52f7462462a339e7535d724550 --- /dev/null +++ "b/\350\214\203\351\233\250\346\232\204/20220523-php\346\225\260\346\215\256\345\272\223\350\277\236\346\216\245.md" @@ -0,0 +1,110 @@ +# 作业 + +1.Mysql中新建个student数据库,里面有个学生信息表user,表结构和内容如下 + +| 字段 | 类型 | 备注 | +| ----- | ------- | ---------- | +| id | int | 自增,主键 | +| name | varchar | 非空 | +| score | decimal | 非空 | + +| 1 | 陈小龙 | 98.5 | +| ---- | ------ | :--: | +| 2 | 吴大虫 | 75.5 | +| 3 | 陈得胜 | 66 | + +2.完成PHP访问数据库五步。使用mysqli扩展对mysql数据库中的学生信息表进行增删改查。 +3.交作业时,要把mysql相关代码和php一起提交 + +```html +create database student charset utf8; +use student; +create table USER( +id int primary key auto_increment, +name varchar(20) not null, +score decimal(3,1) not null +); + +insert into user values +(1,"陈小虫","98.5"), +(2,"吴大虫","75.5"), +(3,"陈得胜","66"); + +``` + +```php +