Mega Code Archive
This is a function to display a table for Postgres results
\n");
/* Create the headers */
echo( "\n");
for($i = 0; $i < $cols; $i++) {
printf( "%s | \n", pg_FieldName($result, $i));
}
echo( "
");
for($j = 0; $j < $rows; $j++) {
echo( "\n");
for($i = 0; $i < $cols; $i++) {
printf( "%s | \n", pg_result($result, $j, $i));
}
echo( "
");
}
echo( "");
} else {
echo(pg_errormessage);
}
}
?>