mysqlµÄsqlÓï¾äµÄÎÊÌâ
create table roles(
id int auto_increment,
rolesname varchar(15) not null unique,
primary key(id)
);
create table rolesright(
id int auto_increment,
rolesid int references roles(id),
rightid int references right(id),
primary key(id)
);
create table right(
id int auto_increment,
rightname varchar(20) not null,
url varchar(50),
primary key(id)
);
ÕâÉÏÃæµÄÓï¾äÓдíÎóÂð£¿×ÜÊdzöÏÖ´íÎó
create table roles(
id int auto_increment,
rolesname varchar(15) not null unique,
primary key(id)
);
create table `right`(
id int auto_increment,
rightname varchar(20) not null,
url varchar(50),
primary key(id)
);
create table rolesright(
id int auto_increment,
rolesid int references roles(id),
rightid int references `right`(id),
primary key(id)
);
¸Ä³ÉÈçÉÏ£¬
1 right ÊDZ£Áô×Ö£¬ÐèÒª¼ÓÉÏ ·´ÒýºÅ``
2. Ó¦¸ÃÏȽ¨ right ±í
SQL code:
mysql> create table roles(
-> id int auto_increment,
-> rolesname varchar(15) not null unique
-> primary key(id)
-> );
Query OK, 0 rows affected (0.08 sec)
mysql>
Ïà¹ØÎÊ´ð£º
±íÈçÏÂ
½ÌÊÒID ×ùλÊý ¿ªÊ¼Ê±¼ä ½áÊøÊ±¼ä 2009Äê1ÔÂ1ÈÕ 2009Äê1ÔÂ2ÈÕ 2009Äê1ÔÂ3ÈÕ
101 50 08£º00 08£º30 30 40 50
101 50 09£º00 ......
ÇëÎÊÏÂÄܲ»ÄÜÔÙwindows϶¨ÆÚÇå¿ÕmysqlÒ»¸ö±íÖеÄÈ«²¿Êý¾Ý£¬ÓÃPHPʵÏÖ£¡
лл¸÷λÁË
¾Í±ÈÈçÒ»¸öÐÇÆÚÇå¿ÕÒ»´Î
±ÈÈçÿ¸öÐÇÆÚÁùÁãµãÇå¿ÕÒ»´Î£¡
ллÁË
¼Æ»®ÈÎÎñ...php....sql...truncate....OK
Äã¾ÍÕâ½ÓÔÚҳà ......
ÎÒÒªµÃµ½Ò»¸ö×Ö·û´®È磺
sdfk|||sgts
sdfsfd|||rgreg
wrfw|||sefw
¾ÍÊÇÒªµÃµ½|||ºóÃæµÄ×Ö·û´®£¬ÓÐʲôº¯ÊýÂð£¿ÔõôÓÃÄØ£¿Ð»Ð»£¡
SQL code:
select
right(col,len(col)-charindex('|||',col)-2)
f ......
--drop table #T1
--drop table #T2
create Table #T1(ID int,
QueryID nvarchar(20),
ResultID1 nvarchar(20),
ResultID2 nvarchar(20))
create Table #T2(SortNo int,
QueryID nvarchar(20),
ResultID1 nv ......
clientserial devseral chunnelnum devdata5
CZ0001 308001 5000 11.1
CZ0001 308001 5001 11.2
CZ0001 308001 5002 11.3
CZ0001 3080 ......