$insertsql=<<<EOTinsert into tb_manager values(null,'$name','$pwd','1');select @pid:=last_insert_id();//尋找最新插入記錄ID並賦值給pid,pid進行傳值insert into tb_mastergroup values(null,@pid,'$name',2,'1','MR');EOT;$sql=mysql_query($insertsql);mysql