Php 如何获取以前查找的行的MySQL主键?
$school\u ID\u result变量需要包含它刚刚查找的行的school\u ID(主键)(将只有一个)。添加,然后从数组中获取Php 如何获取以前查找的行的MySQL主键?,php,mysql,html,css,database,Php,Mysql,Html,Css,Database,$school\u ID\u result变量需要包含它刚刚查找的行的school\u ID(主键)(将只有一个)。添加,然后从数组中获取school\u ID: $query_check_domain_exists = "SELECT * FROM schools where domain ='$email_domain'"; $result_check_domain_exists = mysqli_query($d_schools, $query_check_domain_exists);
school\u ID
:
$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 = ?
能否显示示例表数据和希望检索的示例?“SELECT*”返回包含主键字段的完整行。
$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'];