php - sqlsrv fetch array is only returning 1 result (most recent) and i know there is 5+ for a particular code -


here query, it's pulling added holdcode. armcode patient id , holdcode 2 digit code.

$test = sql::query("select armcode, holdcode are.aas.me armcode = 'adsmanzs01'", $row['holdcode']); if($test){   $data = sqlsrv_fetch_array($test);   echo $data['holdcode']; }  

do need foreach or loop through results have them echo or print_r?

as usual, appreciated.

use while loop iterate results

  while ($data = sqlsrv_fetch_array($test);) {       //perform task   } 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -