$query_a=mysql_quey($sql_a)
$rs_a=mysql_fetch_array($quey_a)
$sql_del_a="delete from A where id=".$rs_a['id']
=mysql_query($sql_del_a)
if($query_del_a>0){
echo "删除成功!"
}
$sql_b="selete id from B like %100%"
$query_b=......($sql_b)//同上
$rs_b=.................($quey_b)//同上
$sql_del_b="delete from B where id=".$rs_b['id']
.
.
.
create database test_dbuse test_dbcreate table student(id int auto_increment not null,name varchar(20),class varchar(20),primary key(id))create table course(id int auto_increment not null,name varchar(20),primary key(id))create table takes(id int auto_increment not null,takes_student int,takes_course int,score int(2),primary key(id))alter table takes add constraint fk_takes_student foreign key (takes_student) references student (id) on delete set null on update cascadealter table takes add constraint fk_takes_course foreign key (takes_course) references course (id) on delete set null on update cascadeselect * from userinfo where article_name in (select top 3 article_name from userinfo where mc_time = '2009/09/03' group by article_name order by count(*) desc )select top 3 article_name from userinfo where mc_time = '2009/09/03' group by article_name order by count(*) desc
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)