====== setTableCasing ======
~~NOTOC~~
== See Also ==
[[v5:dictionary:gettablecasing|getTableCasing()]]
== Syntax From ADOdb 6.0 *==
void setTableCasing(
int $caseOption
)
* This feature is supported in the IBM DB2 driver from version 5.21.0
===== Description =====
''setTableCasing()'' is a helper method that automatically converts any **table** name provided to a metaFunction to the specified case. This is mostly important to a DBMS where table names are case-sensitive. The method can be called multiple times during a program.
===== Options =====
The following options are available
^Constant^Value^Description^
|TABLECASE_LOWER|0|Table names are converted to lower case|
|TABLECASE_UPPER|1|Table names are converted to upper case|
|TABLECASE_DEFAULT|2|No case conversion on input table names is performed|
The default value is TABLECASE_DEFAULT.
===== Usage =====
/*
* Connection to DB2 database assumed
*/
$db->setTableCasing($db::TABLECASE_UPPER);
$r = $db->metaColumnNames('Act');
/*
* table casing automatically converts to 'ACT'
*
*returns
Array(
[0] => ACTNO,
[1] => ACTDESC
)
*/
$db->setTableCasing($db::TABLECASE_LOWER);
$r = $db->metaColumnNames('Act');
/*
* table casing automatically converts to 'act'
*
* because DB2 is case-sensitive, it returns
Array(
)
*/