老葛的Drupal培训班 Think in Drupal
Drupal核心没有使用这一数据类型,它使用的是存放在整数字段中的Unix时间戳。Datetime格式是一个包含了日期和时间的混合格式。
$field['fieldname'] = array(
'type' => 'datetime', // Required.
'not null' => TRUE, // Defaults to FALSE.
'description' => t('Always state the purpose of your field.'),
);
二进位:Blob
二进位大型对象数据类型用于存储二进制数据(例如,Drupal的cache表用来存储缓存数据)。二进位数据包括音乐,图片,或者视频。有两个尺寸可用,normal 和big。
$field['fieldname'] = array(
'type' => 'blob', // Required.
'size' => 'normal' // normal | big
'not null' => TRUE, // Defaults to FALSE.
'description' => t('Always state the purpose of your field.'),
);