Selecting a count from a table
$statmt_txt = "select count(*) count from vhs where type_code = 'ST1' ";
$statmt_id1 = ifx_query($statmt_txt,$connect_id); // EXECUTE SQL
if (!$statmt_id1) { chk_ifx_err1($statmt_id1); } // CHECK FOR ERROR
$row = ifx_fetch_row($statmt_id1); // FETCH RESULT OF COUNT INTO ARRAY
if (!$row) { chk_ifx_err1($statmt_id1); } // CHECK FOR ERROR
$num_rows_selected = sprintf("%d",$row[count]); // FORMAT COUNT
echo "$num_rows_selected rows selected <BR>"; // DISPLAY RESULT IN HTML