ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:dictionary:metacolumnnames

Differences

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

Link to this comparison view

Next revision
Previous revision
dictionary:metacolumnnames [2015/08/12 02:00] – created mnewnhamv5:dictionary:metacolumnnames [2016/02/24 18:24] (current) – Improved description of casing of keys and values mnewnham
Line 10: Line 10:
 </WRAP> </WRAP>
 ===== Description ===== ===== Description =====
-The function ''metaColumnNames()'' accepts a single string parameter, a table name in the database that is currently attached, and returns either an associative array of the columns in the table, or a numeric array based on the value of ''$numericIndices''The keys of the array are the column names in upper case and the values are the column names in lower case. For a full description of column information, use the function [[dictionary:metaColumns|metaColumns()]] instead.+The function ''metaColumnNames()'' accepts a string parameter, a table name in the database that is currently attached, and returns either an associative array of the columns in the table, or a numeric array based on the value of ''$numericIndices'' 
 + 
 +----------------------- 
 +==== Casing ==== 
 +For associative arrays, the keys of the array are the column names in **upper case**. 
 + 
 +For both numeric and associative arrays, the values of the array are the column names in the **natural case** of the database. 
 + 
 +For a full description of column information, use the function [[v5:dictionary:metacolumns|metaColumns()]] instead
 + 
 +==== $numericIndices ==== 
 +If the optional 2nd argument is passed as true, the indexes are returned as a numeric index based on the natural order of the fields in the table. There is no definitive order of column names returned, it may be based on alphabetical order or possibly the order in which the columns were added to the table.
  
 ===== Postgres Only Option ==== ===== Postgres Only Option ====
v5/dictionary/metacolumnnames.txt · Last modified: 2016/02/24 18:24 by mnewnham