2015年4月29日

摘要: 1.建立索引create table t1( tname varchar(30), key (tname) -- 建立索引的第一种方式 key tt(tname asc) tt为索引的名字 );(2)增加主键约束会自带索引(3)-- 为tname 字段 建立索引名字为tn create index tn on t1(tname desc);(4)... 阅读全文

posted @ 2015-04-29 21:59 小蕊同学 阅读(934) 评论(0) 推荐(0) 编辑

摘要: $f=300; define('aa', 1);//常量 是全局变量可以调用 function bb(){ global $f; //注册全局变量不然$f无法输出 echo $f; echo aa; }bb(); 来自为知笔记(Wiz) 阅读全文

posted @ 2015-04-29 11:36 小蕊同学 阅读(114) 评论(0) 推荐(0) 编辑

摘要: 外键控制teacher student, 删除teacher数据的时候必须用delete from teacher tid;删除所有的老师,不能用truncate teacher; 删除会报错的原因是什么答案为因为外键控制的原因 阅读全文

posted @ 2015-04-29 11:23 小蕊同学 阅读(94) 评论(0) 推荐(0) 编辑

摘要: //定义任意字符串 $age=18; $a=dfsda 年龄:$age//可以引入变量 dfa dfasdf sdfsd pp;echo $a ; //定义任意字符串 不可以引入变量 $age=18; $mm=dfsda 年龄:$age//不... 阅读全文

posted @ 2015-04-29 10:42 小蕊同学 阅读(283) 评论(0) 推荐(0) 编辑

摘要: 1 create table teacher( 2 tid int unsigned auto_increment primary key, 3 tname varchar(30) not null 4 )engine=myisam charset =utf8; 5 inser... 阅读全文

posted @ 2015-04-29 09:56 小蕊同学 阅读(201) 评论(0) 推荐(0) 编辑

摘要: 1 show tables; 2 desc book; 3 select * from book; 4 alter table book add sscore tinyint unsigned default 60; 5 insert into book values (null,'李五... 阅读全文

posted @ 2015-04-29 00:41 小蕊同学 阅读(167) 评论(0) 推荐(0) 编辑


Copyright © 2024 小蕊同学
Powered by .NET 8.0 on Kubernetes