Prev | Current Page 94 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"

)
Here, we have modified the structure (as explained in Chapter 6) of the phone field
in the author table to permit a NULL value. The Null checkbox is not checked here:
The data is erased after checking the Null box, as shown in the following screenshot:
The Edit panel will appear this way if this row is ever brought on-screen again.
Applying a Function to a Value
The MySQL language offers some functions that we may apply to data before
saving, and some of these functions appear in a drop-down menu beside each field if
$cfg['ShowFunctionFields'] is set to TRUE.
Changing Data
[ 88 ]
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 UCASE function to the title
when saving this row:
Chapter 5
[ 89 ]
This feature may be disabled by setting $cfg['ShowFunctionFields'] to FALSE to
gain some screen space (to be able to see more of the data).


Pages:
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106