PHP求助!在一个php文件中如何执行两个不同的insert语句?
<?php
session_start();
include("Conn/conn.php");
$ISBN=$_POST["ISBN"];
$B_Name=$_POST["bookName"];
$B_Author=$_POST["B_Author"];
$B_Pub=$_POST["B_Pub"];
$B_Author=$_POST["B_Author"];
$B_BuyTime=date("Y-m-d");
$B_Num=$_POST["B_Num"];
$Content=$_POST["content"];
echo $B_Num."<br>";//测试输出语句
echo $Content;//测试输出语句
$sql1=mysql_query("insert into book1(ISBN,B_Name,B_Author,B_Pub,B_BuyTime)values('$ISBN','$B_Name','$B_Author','$B_Pub','$B_BuyTime')");
$sql2=mysql_query("insert into book2(B_Num,ISBN,Borrowed,Ordered,Introduction)values('$B_Num','$ISBN','否','否','$Content')");
echo "<script language='javascript'>alert('图书信息添加成功!');history.back();location.href='book.php';</script>";
?>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">