本文整理匯總了PHP中DBField::add_key方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBField::add_key方法的具體用法?PHP DBField::add_key怎麽用?PHP DBField::add_key使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBField
的用法示例。
在下文中一共展示了DBField::add_key方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
return;
}
ExtensionConfig::add_language_key('imageuploading', 'Image Uploading', 'English');
ExtensionConfig::add_page('/extensions/uploadimage', array('file' => 'uploadimage.php', 'template' => false, 'nocontentbox' => true));
if (!file_exists(FORUM_ROOT . '/static/userimages')) {
mkdir(FORUM_ROOT . '/static/userimages');
}
ExtensionConfig::add_page('/admin/imageuploading', array('file' => 'admin/imageuploading.php', 'template' => true, 'nocontentbox' => true, 'admin' => true));
ExtensionConfig::add_admin_menu('imageuploading', 'imageuploading');
ExtensionConfig::add_page('/myimages', array('file' => 'myimages.php', 'template' => true));
set_config('user_image_maxwidth', 1024);
set_config('user_image_maxheight', 768);
set_config('user_image_maxsize', 512);
$table = new DBTable('userimages');
$new_fld = new DBField('id', 'INT');
$new_fld->add_key('PRIMARY');
$new_fld->add_extra('NOT NULL');
$new_fld->add_extra('AUTO_INCREMENT');
$table->add_field($new_fld);
$new_fld = new DBField('filename', 'VARCHAR(256)');
$new_fld->add_extra('NOT NULL');
$table->add_field($new_fld);
$new_fld = new DBField('user', 'INT');
$new_fld->add_extra('NOT NULL');
$table->add_field($new_fld);
$new_fld = new DBField('ip_addr', 'VARCHAR(50)');
$new_fld->add_extra('NOT NULL');
$table->add_field($new_fld);
$new_fld = new DBField('time', 'INT');
$new_fld->add_extra('NOT NULL');
$table->add_field($new_fld);