大家我的php程序有问题,我不明白问题出在哪里。当我执行第一个查询时一切正常,但第二个不起作用。我尝试放入mysql我没有解决问题,然后我认为我的变量有问题并更改了它们。但是还是什么都没有……你能帮帮我吗?...
//duplicate ressource
mysql_query("insert into ressource (id_mission, name, ressource_path, assignment, position)"
."select ".$new_id_mis.", name, ressource_path, assignment, position from ressource where id_mission=".$id_mission.";");
/*testing in sql:
insert into ressource (id_mission, name, ressource_path, assignment, position)
select 70, name, ressource_path, assignment, position from ressource where id_mission=5; */
//duplicate report_part NB: report_part.procedure => procedure is a key word in sql
mysql_query("insert into report_part (id_mission, position, title, text, drawing, dataset, report_part.procedure, assignment)"
."select ".$new_id_mis.", position, title, text, drawing, dataset, report_part.procedure, assignment from report_part"
."where id_mission=".$id_mission.";");
/*tested:
insert into report_part (id_mission, position, title, text, drawing, dataset, report_part.procedure, assignment)
select 17, position, title, text, drawing, dataset, report_part.procedure, assignment from report_part
where id_mission=1; */