I am trying get the number of rows (or number of primary keys) in a table using PHP and then outputting the result in to a webpage. I am new to SQL server and this wouldn't give me any results
//code above omitted and connected to the database
$query_count = "SELECT COUNT(*) FROM ElectronicShop";
$data_count = sqlsrv_query($connectString, $query_count) or die(print_r(sqlsrv_errors(SQLSRV_ERR_ALL), true));
//$row_count = sqlsrv_fetch_row($data_count);
echo "<br>ROW COUNT:".sqlsrv_fetch_object($data_count)."<br>";