每访问一次该字段,字段值就加1 用php很容易实现的喔update tb_name set click=click+1
create table abc(id int(10) not null auto_incremnet primary key, name varchar(10) not null, address varchar(200) not null, postcode char(6) not null ); 这样就创建了一个表,这个表的id子段是自动增长的。你还可以在一建好的表中增加这样的字段,操作如下: alter table tb_name add id int(10) not null auto_increment first; 或者 alter table tb_name add id int(10) not null auto_increment;
用php很容易实现的喔update tb_name set click=click+1
name varchar(10) not null,
address varchar(200) not null,
postcode char(6) not null
);
这样就创建了一个表,这个表的id子段是自动增长的。你还可以在一建好的表中增加这样的字段,操作如下:
alter table tb_name add id int(10) not null auto_increment first;
或者
alter table tb_name add id int(10) not null auto_increment;