关于新闻,在线编辑器建表时此字段一定要为text
create table about(
content text
)engine=myisam default charset=utf8;
create database day456 default charset utf8;
create table user(
)engine=myisam default charset=utf8;
select * from stu;
use day456;
drop table user;
use day456;
select * from user;
truncate user;
use hnscdb;
select * from hnsc_guestbook;
drop table hnsc_guestbook;
create table hnsc_guestbook(
id int unsigned auto_increment,
gname varchar(50),
content text,
gsex varchar(5),
gtell varchar(20),
gphpne varchar(20),
gadress varchar(50),
gmail varchar(50),
gtime int,
gip varchar(15),
gflag enum('y','n') default 'n',
primary key(id)
)engine=myisam default charset=utf8;
create table hnsc_zz(
id int unsigned auto_increment,
ztitle varchar(200),
url varchar(200),
cname varchar(50),
flag enum('y','n') default 'y',
primary key(id),
constraint fk foreign key (cname) references hnsc_zzclass(cname) on delete set null on update cascade
)engine=innodb default charset=utf8;
use hnscdb;
select * from hnsc_zz;
drop table hnsc_zz;
truncate hnsc_zz;
create table hnsc_zzclass(
cname varchar(50),
primary key(cname)
)engine=innodb default charset=utf8;
create table hnsc_zz(
id smallint unsigned auto_increment,
title varchar(50),
url varchar(200),
cname varchar(50),
flag enum('y','n') default 'y',
primary key(id),
constraint fk foreign key (cname) references hnsc_zzclass(cname) on delete set null on update cascade
)engine=innodb default charset=utf8;
select * from hnsc_zzclass;
select * from hnsc_zz;
truncate hnsc_zz;
create table hnsc_newsclass(
cname varchar(50),
primary key(cname)
)engine=innodb default charset=utf8;
create table hnsc_news(
id smallint unsigned auto_increment,
title varchar(50),
content text,
author varchar(200),
num int unsigned default 0,
ntime int unsigned,
cname varchar(50),
flag enum('y','n') default 'y',
primary key(id),
constraint nfk foreign key (cname) references hnsc_newsclass(cname) on delete set null on update cascade
)engine=innodb default charset=utf8;
drop table hnsc_news;
select * from hnsc_newsclass;
truncate hnsc_news;
use hnscdb;
select * from hnsc_link;
drop table hnsc_pro;
create table hnsc_pro(
id smallint unsigned auto_increment,
title varchar(50),
img varchar(200),
content text,
num int unsigned default 0,
ntime int unsigned,
flag enum('y','n')default 'n',
jflag enum('y','n')default 'y',
primary key(id)
)engine=myisam default charset=utf8;
select * from hnsc_pro;
truncate hnsc_pro;
insert into hnsc_pro(content) values('你好');
insert into hnsc_pro(title,ntime,flag,jflag,content) values('aa',545,'y','n','第三方');
insert into hnsc_pro(title,ntime,flag,jflag,content,img) values('aa','10','y','n','你好','ds.jpg');
use hnscdb;
create table hnsc_user(
account varchar(50) primary key,
pwd varchar(50), -- 密码
truename varchar(50),-- 真是姓名
face varchar(200), -- 注册时上传的头像
why varchar(100), -- 注册时设置的问题
ok varchar(100), -- 设置的问题的答案
rip varchar(15),
regtime int unsigned-- 注册的时间
)engine=myisam default charset=utf8;
use hnscdb;
select * from hnsc_user;
drop table hnsc_user;
-- 日志管理表
create table hnsc_userlog(
id smallint unsigned auto_increment,
account varchar(50), -- 账户
alog varchar(30), -- 用户的日志操作的内容
aip varchar(15), -- 登录的ip
atime int unsigned, -- 登录的时间
primary key(id)
)engine=myisam default charset=utf8;
-- 上一篇
select id from hnsc_news where cname in(
select cname from hnsc_news where id=3)and id>3 limit 1;
-- 下一篇
select id from hnsc_news where cname in(
select cname from hnsc_news where id=5)and id<5 order by id desc limit 1;
select * from hnsc_news;
create table about(
content text
)engine=myisam default charset=utf8;
select * from about;
drop table about;
truncate table about;
<h1 class="newschptit" style="margin: 0px; padding: 0px; border: 0px; width: 700px; text-align: cent
关于新闻,在线编辑器建表时此字段一定要为text的更多相关文章
- SAP:建表时如果有QUAN、CURR类型的字段不能激活的问题
建表时如有一个QUAN类型的字段,那么就要给字段设置Reference field,参考的字段的Data Type要是UNIT, 并设置对应的Reference table,也就是参考字段所在的tab ...
- mysql workbench 建表时 PK,NN,UQ,BIN,UN,ZF,AI解释
mysql workbench 建表时 - PK: primary key (column is part of a pk) 主键 - NN: not null (column is nullable ...
- MVC EF 移除建表时自动加上s的复数形式
移除建表时自动加上s的复数形式 public class DBContext : DbContext { public DBContext() : base("name=DBContext& ...
- oracle 建表时显示ORA-00984: 列在此处不允许
oracle 建表时显示ORA-00984: 列在此处不允许 CreationTime--2018年7月19日16点10分 Author:Marydon 1.情景展示 使用plsql建表时,报错 ...
- oracle 建表时显示ORA-00904无效的标识符
oracle 建表时显示ORA-00904无效的标识符 CreationTime--2018年7月19日16点03分 Author:Marydon 1.情景展示 使用plsql建表时,报错 字段展 ...
- MySQL建表时列名同保留字重复问题解决办法
建表时遇到遇到属性名同MySQL的保留字相同导致不能建表的问题,如下SQL语句: CREATE TABLE TBL_ACCOUNT_FROZEN_RECORD ( ID BIGINT NOT NULL ...
- 初触hibernate01--MYSQL建表时type=InnoDB和Engine=InnoDB注意点
第一次运行程序时,将Hibernte中的hibernate.hbm2ddl.auto设置成create(或者是update),让Hibernate帮助自动建表,但不成功,报了如下信息: You hav ...
- 【原创】Hibernate通过实体类自动建表时type=MyISAM的问题
ι 版权声明:本文为博主原创文章,未经博主允许不得转载. 当使用的mysql数据库为5.5版本时,方言需要设置为 <property name="hibernate.dialect&q ...
- Hbase建表时遇到的问题This could be a sign that the server has too many connections
Hbase创建表时遇到以下错误: ERROR: org.apache.hadoop.hbase.ZooKeeperConnectionException: HBase is able to conne ...
随机推荐
- iOS 根据UIImage 修改UIImageView Frame (包括截取图片中间部分)
iOS UIImageView 根据需求调整frame 1.图片的宽和高不相等,截取图片的中间部分,截取的部分Size明确 2.图片的宽度要等于其父视图的类的宽度,然后根据宽度计算高度,保证 图片不变 ...
- 简单的线性分类——MATLAB,python3实现
看李政轩老师讲的Kernel,讲的非常好!前面有几道作业题,用MATLAB简单做了下,不知道对不对,错误之处还请指出. 题目是这样的. 一.MATLAB版本: clear; clc % 生成train ...
- PHP性能分析 - ngnx日志分析
最终结果展示图: 图解:响应时间在40ms以内的请求数占请求总量的7%,40到80ms的的请求数占32.9%,依次类推... 性能问题有很多种可能,普通的情况通过xhprof可查得主要的性能损耗.但有 ...
- 自动机理论、语言和计算导论 by John E. Hopcroft
计算理论是计算机应用的基础,理论和应用缺一而不可. ---- 目录 ---- C01 自动机 C02 有穷自动机 C03 正则表达式与正则语言 C04 正则语言的性质 C05 上下文无关文法及上下文无 ...
- EntityFramework 实体映射到数据库
EntityFramework实体映射到数据库 在Entity Framework Code First与数据表之间的映射方式实现: 1.Fluent API映射 通过重写DbContext上的OnM ...
- XML实体注入漏洞
XML实体注入漏洞 测试代码1: 新建xmlget.php,复制下面代码 <?php $xml=$_GET['xml']; $data = simplexml_load_string($xml) ...
- stl 初步的使用
1.sort 和 lower_bound 例如 marble https://uva.onlinejudge.org/index.php?option=com_onlinejudg ...
- Python-select详解(select、epoll)
select函数操作集合的时候有个要求,要么集合本身是描述符,要么他提供一个fileno()接口,返回一个描述符. I/O多路复用是在单线程模式下实现多线程的效果,实现一个多I/O并发的效果.看一个简 ...
- 20151215单选按钮列表,复选框列表:CheckBoxList
单选框:RadioButton GroupName:组名,如果要实现单选效果每个单选按钮的组名必须一样 是否被选中 RadioButton.checked 单选按钮列表:RadioButtonList ...
- WebApi:自定义筛选器
最近在项目中有这样一个需求,记录每次Api访问的调用时间,运行时间,传入数据,返回数据等信息. 第一反应就是添加一个类,用来实现相应的功能,然后在方法的代码中添加,但是这样的话,需要修改所有的方法的代 ...