ifx_htmltbl_result

ifx_htmltbl_result -- Formats all rows of a query into a HTML table

Description

int ifx_htmltbl_result(int result_id, string [html_table_options] );

Returns the number of rows fetched or FALSE on error.

Formats all rows of the result_id query into a html table. The optional second argument is a string of <table> tag options

Example 1. Informix results as HTML table

  1 
  2 $rid = ifx_prepare ("select * from emp where name like " . $name,
  3                      $connid, IFX_SCROLL);
  4 if (! $rid) {
  5    ... error ...
  6 }
  7 $rowcount = ifx_affected_rows ($rid);
  8 if ($rowcount > 1000) {
  9     printf ("Too many rows in result set (%d)\n<br>", $rowcount);
 10     die ("Please restrict your query<br>\n");
 11 }
 12 if (! ifx_do($rid) {
 13   ... error ...
 14 }
 15 
 16 ifx_htmltbl_result ($rid, "border=\"2\"");
 17 
 18 ifx_free_result($rid);
 19