ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:getcol

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
reference:getcol [2015/07/21 17:07] – [Description] mnewnhamv5:reference:connection:getcol [2019/05/08 16:41] (current) – ADODB_ASSOC_CASE not $ADODB_ASSOC_CASE dregad
Line 3: Line 3:
 <WRAP right box> <WRAP right box>
 == syntax == == syntax ==
-   mixed getAll {+   mixed getCol {
          mixed $sql          mixed $sql
          optional string[] $bindvars          optional string[] $bindvars
Line 11: Line 11:
  
 ===== Description ===== ===== Description =====
-The function executes a statement and returns the first column of the entire recordset in an array or false if the statement execution fails. If no records match the provided SQL statement, and empty array is returned.+The function executes a statement and returns the first column of each row of the the entire recordset in an array or false if the statement execution fails. If no records match the provided SQL statement, an empty array is returned.
  
-The presentation of the returned data can be modified by the variables [[reference:adodb_fetch_mode|$ADODB_FETCH_MODE]]  and [[reference:adodb_assoc_case|$ADODB_ASSOC_CASE]] and the function [[reference:setfetchmode|setFetchMode()]].+The presentation of the returned data can be modified by:   
 +  * [[v5:reference:adodb_fetch_mode|$ADODB_FETCH_MODE]] variable, 
 +  [[v5:reference:adodb_assoc_case|ADODB_ASSOC_CASE]] constant, 
 +  * [[v5:reference:connection:setfetchmode|setFetchMode()]] function.
  
-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()]].
  
 The optional third parameter passed enables space trimming of the returned value. This is only relevant if the returned string is coming from a CHAR type field. The optional third parameter passed enables space trimming of the returned value. This is only relevant if the returned string is coming from a CHAR type field.
v5/reference/connection/getcol.1437491279.txt.gz · Last modified: 2017/04/21 11:35 (external edit)