ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:getassoc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
reference:getassoc [2015/07/21 18:35] mnewnhamv5: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:adodb_assoc_case|$ADODB_ASSOC_CASE]].+The presentation of the returned data can be modified by the variable [[v5:reference:adodb_assoc_case|$ADODB_ASSOC_CASE]].
  
-For a detailed description of the SQL and bind parameters passed, see [[reference:execute|execute()]].+For a detailed description of the SQL and bind parameters passed, see [[v5:reference:connection:execute|execute()]].
  
 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 ''$forceArray'' and ''$first2Cols''. 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 ''$forceArray'' and ''$first2Cols''.
Line 42: Line 42:
 </code> </code>
 ==== 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 an array beneath that key. That array can be controlled using [[reference:setfetchmode|setFetchMode()]] and [[reference:adodb_assoc_case|$ADODB_ASSOC_CASE]].+When more than 2 columns are requested, the first column becomes the key, all other columns become a numeric array beneath that key.
 <code php> <code php>
 /* /*
v5/reference/connection/getassoc.txt · Last modified: 2017/05/09 01:09 by mnewnham