Database Reference
In-Depth Information
Applying a function to a value
The MySQL language offers some functions that we may apply to data before
saving. Some of these functions appear in a drop-down menu beside each field,
if $cfg['ShowFunctionFields'] is set to TRUE .
The function list is defined in the $cfg['Functions'] array. The most
commonly used functions for a certain data type are displayed first in the list.
Some restrictions are defined in the $cfg['RestrictColumnTypes'] and
$cfg['RestrictFunctions'] arrays, to control which functions are displayed first.
Here are the definitions that restrict the function names to be displayed for the
VARCHAR type:
$cfg['RestrictColumnTypes'] = array(
'VARCHAR' => 'FUNC_CHAR', [...]
$cfg['RestrictFunctions'] = array(
'FUNC_CHAR' => array(
'ASCII',
'CHAR',
'SOUNDEX',
'LCASE',
'UCASE',
'PASSWORD',
'OLD_PASSWORD',
'MD5',
'SHA1',
'ENCRYPT',
'COMPRESS',
'UNCOMPRESS',
'LAST_INSERT_ID',
'USER',
'CONCAT'
), [...]
As depicted in the following screenshot, we apply the UPPER function to the title
when saving this row:
 
Search WWH ::




Custom Search