是否可以同时编辑以下编码的数据并将其保存到两个不同的表中?只需查看将数据输入数据表的代码即可。
if($opt>=$rec['gwstart'] && $opt<=$rec['gwend'])
{
$con=mysql_connect('localhost','root') or die ("Server connection failure!");
$db=mysql_select_db('regional_data',$con) or die ("Couldn't connect the database");
$SQL22="UPDATE newchk SET totgw=$AAA where gwstart=$BBB";
$run22=mysql_query($SQL22,$con) or die ("SQL Error");
$SQL33="INSERT INTO invoentry (user_inv,dist_inv,chkNum,InvoNum,InvoVal,InvoDate,DueDate,type,condition) VALUES ('$naMex','$distUsr','$listVal','$InNo','$InValu','$date1','$date2','$typ','$cnd')";
$run33 = mysql_query($SQL33,$con) or die ("SQL Error!..");
$MSG ="Successfully saved your entry! ".$AAA." cheques are remaining.";
}