php reads the query result set with sqlsrv_fetch (). There are only three records in the table, but four times of fetch execution does not return false, but the fifth time returns false,. Why not false the fourth time (the test found that the fourth time is NULL and the fifth time is bool (false))? Thank you!
4
if( sqlsrv_fetch ( $stmt ) === false ) {
die( print_r ( sqlsrv_errors (), true ));
}
$name = sqlsrv_get_field ( $stmt , 0 );
echo " $name : " ;
$comment = sqlsrv_get_field ( $stmt , 1 );
echo $comment ;echo "<hr>";