执行SQL出错 请大神帮我看一下
<?php$serverName = "192.168.0.98"; //数据库服务器地址
$uid = "sa"; //数据库用户名
$pwd = "123456"; //数据库密码
$connectionInfo = array("UID"=>$uid, "PWD"=>$pwd, "Database"=>"AIS20160314104736");
$conn = sqlsrv_connect($serverName, $connectionInfo);
if( $conn == false)
{
echo "连接失败!";
exit;
}
$sql = "selsect ICStockBill.FBillNo,t_ICItem.FName form ICStockBill left join t_ICItem on ICStockBill.FItemID = t_ICItem.FItemID";
$query = sqlsrv_query( $conn, $sql);
while ($row = sqlsrv_fetch_array($query)) {
echo $row['FBillNo'] ;
}
?>
提示出错:
Warning: sqlsrv_fetch_array() expects parameter 1 to be resource, bool given in D:\WWW\index.php on line 23