誰か助けてくれませんか。wordpress データベース内のテーブルにデータを追加しようとしています。$wpdb クラスを使用していますが、コードを実行するたびに、適切な検証が行われます。しかし、データベースのテーブルを確認すると、空です。
私のコード:
    // Define global $wpdb
    global $wpdb;
    // Retrieve information from the form
    $location = $_POST['txtLocation'];
    $price = $_POST['txtPrice'];
    $type = $_POST['sltType'];
    $revenue = $_POST['txtRevenue'];
    $surgeries = $_POST['txtSurgeries'];
    $tenure = $_POST['sltTenure'];
    $upload = $_POST['txtUpload'];
    // SQL statement to insert information from the form into the database
    $sql = $wpdb->prepare("INSERT INTO practices ('Location', 'Price', 'Type', 'Revenue', 'No. of Surgeries', 'Tenure', 'PDF') VALUES (%s,%s,%s,%s,%s,%s,%s", $location, $price, $type, $revenue, $surgeries, $tenure, $upload);
    $result = $wpdb->query($sql);
    if (!result) {
        echo '<p class="sql-error">There was a problem uploading the practice to the database</p>';
    } else {
        echo '<p class="sql-success">The practice was uploaded to the database</p>';
    }
    echo $wpdb->last_query;
私のコードがこれを行っている理由を誰かが知っていますか???
ありがとう