这让我发疯,我似乎无法在网上找到任何解决方案。我正在尝试使用sqlsvr_fetch_array()函数并继续发生致命错误。它说:“致命错误:在第39行的C:\ inetpub \ wwwroot \ confirmation.php中调用未定义的函数sqlsvr_fetch_array()”
这是我的代码:
$connectionInfo = array(
"UID" => 'sa',
"PWD" => '*******',
"Database" => "****"
);
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect('10.206.244.103', $connectionInfo);
if ($conn === false) {
echo "Unable to connect.</br>";
die(print_r(sqlsrv_errors(), true));
} else {
echo 'CONNECTED';
}
$params = array();
$options = array( "Scrollable" => SQLSRV_CURSOR_KEYSET );
$sql1 ="SELECT * FROM temp_survey_table WHERE Confirm_Code = 'e32c7cdaf237322234f5ac3e768fbaa9'";
$result1 = sqlsrv_query($conn,$sql1, $params, $options);
$rows=sqlsvr_fetch_array($result8);
$invoice=$rows['Invoice_Number'];
$email=$rows['Email'];
$servicerate=$rows['Service_Rate'];
$foodrate=$rows['Food_Rate'];
$comments=$rows['Comments'];
echo $invoice;
echo $email;
echo $servicerate;
任何帮助将不胜感激。谢谢你提前。
答案 0 :(得分:1)
错字:它是sqlsrv_
,而不是sqlsvr_
。
^ RV ^ VR
人类确实很难区分。