<?php
session_start();
$con=mysqli_connect("localhost","root","","accting");
$query = "USE accting";
$result = mysqli_query($con,$query);
$query = "INSERT INTO document (docDate, supplierName, refNo, vatReg, vpGoods, viGoods, nvPurchases, totalAmt, book, cash, account, termsMonth, termsDay) VALUES ('{$_POST['invoiceDate']}', '{$_POST['supplierName']}', '{$_POST['refNo']}', '{$_POST['vatReg']}', '{$_POST['amtVat']}', '{$_POST['vatInput']}', '{$_POST['nonVat']}', '{$_POST['total']}', '{$_POST['bookType']}', '{$_POST['cash']}', '{$_POST['account']}', '{$_POST['termsMonths']}', '{$_POST['termsDays']}',)";
$result = mysqli_query($con, $query);
echo "Add document successful.";
?>
コマンドの有無に$query = "USE accting";
かかわらず、ページの印刷が [ドキュメントの追加に成功しました] にもかかわらず、エントリはデータベースに追加されません。ここで何が問題なのですか?