Prints the entire result set as an HTML table.
Syntax
int ads_result_all( resource result_id
[, string format] )
Parameters
result_id (I) |
ID of a result set. |
format (I) |
Optional parameter used for table formatting. |
Remarks
ads_result_all returns the number of rows in the result set or returns False in the event of an error. The result is printed in HTML table format. Additional formatting information can be provided via the optional format parameter.
Example
<?
echo "Connecting to Server<br>\n";
$rConn = ads_connect( "DataDirectory=\\\\server1\\share1\\data\\;ServerTypes=2", "", "" );
echo "Connected<br>\n";
echo "Retrieving the list of customers<br>\n";
$rResult = ads_do( $rConn, "SELECT * FROM customers" );
echo "Creating HTML table of results<br>\n";
$iCount = ads_result_all( $rResult );
echo $iCount . " records printed to the table.<br>\n";
echo "Closing the connection<br>\n";
ads_close( $rConn );
echo "Disconnected<br>\n";
?>
See Also