How to make insert and update from different table in one Mysql query with php : Ive tried the code below but it didnt work

    if (isset($_POST['ubah'])) {
    $queryUpdate = mysqli_multi_query("INSERT INTO perbaikan SET id_perbaikan = '',idrusakbaik = '" . $id . "',komenrusak = '" . $_POST['komenrusak'] . "',tglbaik = '" . $tgl_sekarang . "';
    UPDATE kerusakan SET  status = '" . $_POST['status'] . "'WHERE id_kerusakan = '" . $id . "'");
    if ($queryUpdate) {
    
    echo "<script> alert('Data Berhasil Disimpan'); location.href='index.php?hal=master/perbaikan-mekanik/list' </script>";
    exit; }
    }