"); $hSQL = "SELECT * FROM ".$htable." WHERE roc_type='".$roc."' AND roc_serial='".$num."'"; $hres = pg_query($hSQL) or print "ERROR - Couldn't execute header query: $hSQL
"; $hnum = pg_num_rows($hres); if($hnum == 0){ print "Query of $what header table produced empty result!
"; } else { $hrow = pg_fetch_array($hres,0,PGSQL_ASSOC); print "Header table content for ".$what." test:
"; foreach($hrow as $key => $value) print "$key=$value
"; } if($what=="guni") $dtable .= "_2d"; $dSQL = "SELECT * FROM ".$dtable." WHERE roc_type='".$roc."' AND roc_serial='".$num."'"; $dres = pg_query($dSQL) or print "ERROR - Couldn't execute data query: $dSQL
"; $dnum = pg_num_rows($dres); if($dnum == 0){ print "Query of $what data table produced empty result!
"; } else { print "
Data table content for ".$what." test (".$dnum." records):
"; print "Note: posting only the first 100 records!
"; $counter = 0; while ($drow = pg_fetch_array($dres)){ $counter++; if($counter>100) exit; $size = count($drow); for($k=2; $k<$size; $k++) print "$drow[$k] "; print "
"; } } ?>