PHP &

0 Cevap php

For some reason if a user does not have data in the info or pid MySQL tables I can't delete the user form any other table like the user table is there some way I can have the user deleted even if the user has not entered data into the other tables except the user table?

İşte üyelerini silme için kod parçasıdır.

    if(($months >= 3) && ($row['deletion'] == 1)){


        $dqc = mysqli_query($mysqli,"DELETE FROM info WHERE user_id = '" . $row['user_id'] . "'");
        if(!$dqc){ print mysqli_error($mysqli); }

        $dpq = mysqli_query($mysqli,"DELETE FROM pid WHERE user_id = '" . $row['user_id'] . "'");
        if(!$dpq){ print mysqli_error($mysqli); }

        $duq = mysqli_query($mysqli,"DELETE FROM users WHERE user_id = '" . $row['user_id'] . "'");
        if(!$duq){ print mysqli_error($mysqli); }
    }

0 Cevap