$query_check_domain_exists = "SELECT * FROM schools where domain ='$email_domain'";
$result_check_domain_exists = mysqli_query($d_schools, $query_check_domain_exists);
$school_ID_result = ?
$school_ID_result 变量需要包含它刚刚查找的行的 school_ID(主键)(只有一个)。
添加mysqli_fetch_assoc()然后获取school_ID
from 数组:
$query_check_domain_exists = "SELECT * FROM schools where domain ='$email_domain'";
$result_check_domain_exists = mysqli_query($d_schools, $query_check_domain_exists);
$row = mysqli_fetch_assoc($result);
$school_ID_result = $row['school_ID'];