Hi all:
I was under the assumption sqlsrv_num_rows($stmt) is an alternative to using SELECT COUNT. I need to divide a list of results into 2 columns on a page. I want to take the results total and divide by 2 for the total per column. When I try using sqlsrv_num_rows($stmt) it has not effect. There definitely are results in the column.
I also tried
if (sqlsrv_num_rows($stmt)===0) {
echo 'No records found';
}
There absolutely were no records when I tried this, yet the echo didn't appear.