ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:adodb_quote_fieldnames

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
v5:reference:adodb_quote_fieldnames [2016/01/13 02:30] – ↷ Page moved from reference:adodb_quote_fieldnames to v5:reference:adodb_quote_fieldnames mnewnhamv5:reference:adodb_quote_fieldnames [2022/06/09 10:05] (current) – Document BRACKETS quoting (introduced in #246) dregad
Line 4: Line 4:
 The behavior of field name quoting will change in ADOdb Version 6 The behavior of field name quoting will change in ADOdb Version 6
 </WRAP> </WRAP>
-This global variable controls this quoting and casing of field names when the [[autoExecute|autoExecute()]] method is used. The default behavior of autoExecute is to quote field names, and convert them to upper case.+This global variable controls quoting and casing of field names when the [[.connection:autoexecute|autoExecute()]] method is used.  
 +The default behavior of autoExecute is to quote field names, and convert them to upper case.
  
 The following behaviors are available: The following behaviors are available:
Line 10: Line 11:
 ^Value^Description^Example^ ^Value^Description^Example^
 |false|No quoting is done|SELECT field_name FROM table| |false|No quoting is done|SELECT field_name FROM table|
-|true|Quoting is done, no case handling of the field name|SELECT `field_name` FROM table|+|true|Quoting is done((The quoting character is driver-specific and defaults to ''"'')), no case handling of the field name|SELECT `field_name` FROM table| 
 +|BRACKETS|Fields are wrapped in brackets((The brackets type is driver-specific, square brackets ''[]'' are used by default,)), no case handling of the field name|SELECT [field_name] FROM table|
 |UPPER|Quoting is done, field name is upper cased (default)|SELECT `FIELD_NAME` FROM table| |UPPER|Quoting is done, field name is upper cased (default)|SELECT `FIELD_NAME` FROM table|
 |LOWER|Quoting is done, field name is lower cased |SELECT `field_name` FROM table| |LOWER|Quoting is done, field name is lower cased |SELECT `field_name` FROM table|
 |NATIVE|Quoting is done, field name is as defined in the database|SELECT `Field_Name` FROM table| |NATIVE|Quoting is done, field name is as defined in the database|SELECT `Field_Name` FROM table|
 +
 +<WRAP important>
 +While the intended behavior when using //true// or //false// is to not do any case conversion of the field names, in 5.21 they are actually **converted to upper case**.
 +
 +This is a [[https://github.com/ADOdb/ADOdb/issues/745|known issue]], caused by a design problem with this setting which mixes case conversion and quoting. 
 +It will be fixed in a future release.
 +</WRAP>
  
 ===== Usage ===== ===== Usage =====
v5/reference/adodb_quote_fieldnames.1452648616.txt.gz · Last modified: 2017/04/21 11:31 (external edit)