query($sql); echo "HMS CURRENT ADMISSIONS QUERY RESULTS (" . $res->num_rows . " rows):\n\n"; while ($row = $res->fetch_assoc()) { print_r($row); }