v5:reference:connection:getassoc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
reference:getassoc [2015/07/21 18:34] – mnewnham | v5:reference:connection:getassoc [2016/02/09 01:35] – [Description] mnewnham | ||
---|---|---|---|
Line 14: | Line 14: | ||
The function executes a statement and returns all of the returned rows in an array or false if the statement execution fails, or if only 1 column is requested in the SQL statement. If no records match the provided SQL statement, an empty array is returned. | The function executes a statement and returns all of the returned rows in an array or false if the statement execution fails, or if only 1 column is requested in the SQL statement. If no records match the provided SQL statement, an empty array is returned. | ||
- | The presentation of the returned data can be modified by the variable [[reference: | + | The presentation of the returned data can be modified by the variable [[v5:reference: |
- | For a detailed description of the SQL and bind parameters passed, see [[reference: | + | For a detailed description of the SQL and bind parameters passed, see [[v5:reference:connection: |
In addition it should be noted that the presentation of the returned data is modified by the number of columns requested in the SQL statement and the setting of the optional parameters '' | In addition it should be noted that the presentation of the returned data is modified by the number of columns requested in the SQL statement and the setting of the optional parameters '' | ||
Line 42: | Line 42: | ||
</ | </ | ||
==== Requesting more than two columns ==== | ==== Requesting more than two columns ==== | ||
- | When more than 2 columns are requested, the first column becomes the key, all other columns become | + | When more than 2 columns are requested, the first column becomes the key, all other columns become |
<code php> | <code php> | ||
/* | /* | ||
Line 114: | Line 114: | ||
* DB2 Connection assumed | * DB2 Connection assumed | ||
*/ | */ | ||
- | $ar = $db-> | + | $ar = $db-> |
/* | /* |
v5/reference/connection/getassoc.txt · Last modified: 2017/05/09 01:09 by mnewnham