bool sqlanywhere_result_all( resource result_identifier [, html_table_format_string [, html_table_header_format_string [, html_table_row_format_string [, html_table_cell_format_string ] ] ] ] )
This function is deprecated.
Fetches all results of the result_identifier and generates an HTML output table with an optional formatting string.
result_identifier The result resource returned by the sqlanywhere_query function.
html_table_format_string A format string that applies to HTML tables. For example, "Border=1; Cellpadding=5". The special value none does not create an HTML table. This is useful if you want to customize your column names or scripts. If you do not want to specify an explicit value for this parameter, use NULL for the parameter value.
html_table_header_format_string A format string that applies to column headings for HTML tables. For example, "bgcolor=#FF9533". The special value none does not create an HTML table. This is useful if you want to customize your column names or scripts. If you do not want to specify an explicit value for this parameter, use NULL for the parameter value.
html_table_row_format_string A format string that applies to rows within HTML tables. For example, "onclick='alert('this')'". If you would like different formats that alternate, use the special token ><. The left side of the token indicates which format to use on odd rows and the right side of the token is used to format even rows. If you do not place this token in your format string, all rows have the same format. If you do not want to specify an explicit value for this parameter, use NULL for the parameter value.
html_table_cell_format_string A format string that applies to cells within HTML table rows. For example, "onclick='alert('this')'". If you do not want to specify an explicit value for this parameter, use NULL for the parameter value.
TRUE on success or FALSE on failure.
This example shows how to use sqlanywhere_result_all to generate an HTML table with all the rows from a result set.
$result = sqlanywhere_query( $conn, "SELECT GivenName, Surname FROM Employees" ); sqlanywhere_result_all( $result ); |
This example shows how to use different formatting on alternate rows using a style sheet.
$result = sqlanywhere_query( $conn, "SELECT GivenName, Surname FROM Employees"); sqlanywhere_result_all( $result, "border=2", "bordercolor=#3F3986", "bgcolor=#3F3986 style=\"color=#FF9533\"", 'class="even"><class="odd"'); |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |