我有一个PHP会话,它存储从表中检索到的id。现在我想在另一个db表中使用该id。
$query = sqlsrv_query("SELECT Customer_ID FROM Customer WHERE Email='$email' AND password = '$password'",$conn);
$result = sqlsrv_num_rows($query);
#checks if the search was made
if($result === false)
{
die( print_r( sqlsrv_errors(), true));
}
if($result === true)
{
['Active'] = $result;
echo 'User Active = ' . $_SESSION['Active']
}
因此,数组'Active'存储'Customer_ID',我想在另一个表中使用它。如何将该id分配给存储过程中的变量?