addons:addons_index
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
addons:addons_index [2016/01/13 16:20] – mnewnham | addons:addons_index [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <WRAP right box> | ||
- | [[v5: | ||
- | </ | ||
- | ====== Unsupported Addons ====== | ||
- | These addon utilities are distributed as part of ADOdb, but are provided as-is, with no confirmation of compatibility with later versions of PHP or operating system, or of compatibility with a specific driver. Fixes and updates are always welcome. | ||
- | ----------------------- | ||
- | <WRAP right box> | ||
- | == Requires == | ||
- | tohtml.inc.php | ||
- | | ||
- | == Syntax == | ||
- | string rs2html ( | ||
- | object $recordset, | ||
- | optional string $tableStyles=false, | ||
- | optional array $columnHeaders=false, | ||
- | optional bool $htmlspecialchars=true, | ||
- | optional bool $echo = true | ||
- | ) | ||
- | </ | ||
- | | ||
- | ===== rs2html ===== | ||
- | This addon provides a method of displaying a recordset in an html table. In its simplest implementation, | ||
- | ==== Parameters ==== | ||
- | === $recordset === | ||
- | A handle to an ADOdb recordset, provided by an '' | ||
- | === $tableStyles === | ||
- | Historically this parameter was used for items like ' | ||
- | === $columnHeaders === | ||
- | If provided, the numeric array is used for column headers instead of the field names. It **must** contain index entries for all columns. | ||
- | === $htmlSpecialChars === | ||
- | By default, the PHP function htmlSpecialChars is applied to all values. This parameter disables this functionality. | ||
- | === $echo === | ||
- | By default, the output is echoed directly to the screen. If the value is set to false, the output is collected in a string and returned from the function. | ||
- | ==== Global Variables ==== | ||
- | THe following variables may be defined, and are globalized into the function | ||
- | ^Variable^Description^ | ||
- | |$gSQLMaxRows|The maximum number of rows displayed in the table. This does not affect the number of rows retrieved| | ||
- | |$gSQLBlockRows|The records returned are grouped into blocks of this number of records. Historically, | ||
- | |$ADODB_ROUND| The number of decimal places that floating point numbers are rounded to| | ||
- | ==== Usage ==== | ||
- | <code php> | ||
- | /* | ||
- | * Connection to Access northwind database | ||
- | */ | ||
- | include ' | ||
- | include ' | ||
- | |||
- | $db = newAdoConnection(' | ||
- | |||
- | $sql = ' | ||
- | $recordset = $db-> | ||
- | |||
- | $tableStyles = " | ||
- | rs2html($recordset, | ||
- | </ | ||
- | -------------------------------------- | ||
- | ===== rs2csv & rs2tab==== | ||
- | <WRAP right box> | ||
- | == Requires == | ||
- | toexport.inc.php | ||
- | | ||
- | == Syntax == | ||
- | |||
- | string rs2csv( | ||
- | obj $recordSet | ||
- | | ||
- | ) | ||
- | |||
- | string rs2tab( | ||
- | obj $recordSet | ||
- | | ||
- | ) | ||
- | </ | ||
- | |||
- | ==== Description ==== | ||
- | The function '' | ||
- | |||
- | ==== Usage ==== | ||
- | <code php> | ||
- | /* | ||
- | * Connection to Northwind Database | ||
- | */ | ||
- | $sql = " | ||
- | |||
- | $recordset = $db-> | ||
- | |||
- | $csv = rs2csv($recordset); | ||
- | </ | ||
- | --------------------------------------- | ||
- | |||
- | <WRAP right info 300px> | ||
- | String fields are not quoted or escaped per standard CSV format | ||
- | </ | ||
- | ------------------------------------------ | ||
- | ===== rs2csvfile & rs2tabfile==== | ||
- | <WRAP right box> | ||
- | == Requires == | ||
- | toexport.inc.php | ||
- | | ||
- | == Syntax == | ||
- | |||
- | void rs2csvfile( | ||
- | obj $recordSet | ||
- | | ||
- | | ||
- | ) | ||
- | |||
- | void rs2tabfile( | ||
- | obj $recordSet | ||
- | | ||
- | | ||
- | ) | ||
- | </ | ||
- | |||
- | ==== Description ==== | ||
- | The function '' | ||
- | |||
- | ==== Usage ==== | ||
- | <code php> | ||
- | /* | ||
- | * Connection to Northwind Database | ||
- | */ | ||
- | |||
- | $filePointer = fopen('/ | ||
- | $sql = " | ||
- | |||
- | $recordset = $db-> | ||
- | |||
- | $csv = rs2csv($recordset, | ||
- | </ | ||
- | ---------------------------------------------- | ||
- | |||
- | <WRAP right info 300px> | ||
- | String fields are not quoted or escaped per standard CSV format | ||
- | </ | ||
- | |||
- | -------------------------------------------------------- | ||
- | |||
- | ===== rs2csvout & rs2tabout==== | ||
- | <WRAP right box> | ||
- | == Requires == | ||
- | toexport.inc.php | ||
- | | ||
- | == Syntax == | ||
- | |||
- | string rs2csvout( | ||
- | obj $recordSet | ||
- | | ||
- | ) | ||
- | |||
- | | ||
- | obj $recordSet | ||
- | | ||
- | ) | ||
- | </ | ||
- | |||
- | ==== Description ==== | ||
- | The function '' | ||
- | |||
- | ==== Usage ==== | ||
- | <code php> | ||
- | /* | ||
- | * Connection to Northwind Database | ||
- | */ | ||
- | $sql = " | ||
- | |||
- | $recordset = $db-> | ||
- | |||
- | $csv = rs2tabout($recordset); | ||
- | </ | ||
- | ------------------------- | ||
- | |||
- | <WRAP right info 300px> | ||
- | String fields are not quoted or escaped per standard CSV format | ||
- | </ | ||
- | ------------------------------ | ||
- | ===== The xmlrpc library ====== | ||
- | This addon provides an interface between the adodb recordset and the php xmlrpc library. [[addons: |
addons/addons_index.1452698439.txt.gz · Last modified: 2017/04/21 11:19 (external edit)