当前位置: 首页>>代码示例>>PHP>>正文


PHP SQL::setup_table方法代码示例

本文整理汇总了PHP中SQL::setup_table方法的典型用法代码示例。如果您正苦于以下问题:PHP SQL::setup_table方法的具体用法?PHP SQL::setup_table怎么用?PHP SQL::setup_table使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SQL的用法示例。


在下文中一共展示了SQL::setup_table方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setup

 /**
  * create tables for files
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['active'] = "ENUM('Y','R','N') DEFAULT 'Y' NOT NULL";
     $fields['active_set'] = "ENUM('Y','R','N') DEFAULT 'Y' NOT NULL";
     $fields['alternate_href'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['anchor'] = "VARCHAR(64) DEFAULT 'section:1' NOT NULL";
     $fields['anchor_id'] = "MEDIUMINT UNSIGNED NOT NULL";
     $fields['anchor_type'] = "VARCHAR(64) DEFAULT 'section' NOT NULL";
     $fields['assign_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['assign_date'] = "DATETIME";
     $fields['assign_id'] = "MEDIUMINT DEFAULT 0 NOT NULL";
     $fields['assign_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['behaviors'] = "TEXT NOT NULL";
     $fields['create_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['create_date'] = "DATETIME";
     $fields['create_id'] = "MEDIUMINT DEFAULT 0 NOT NULL";
     $fields['create_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['description'] = "TEXT NOT NULL";
     $fields['edit_action'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_date'] = "DATETIME";
     $fields['edit_id'] = "MEDIUMINT DEFAULT 0 NOT NULL";
     $fields['edit_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['file_href'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['file_name'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['file_size'] = "INT UNSIGNED DEFAULT 0 NOT NULL";
     $fields['hits'] = "INT UNSIGNED DEFAULT 0 NOT NULL";
     $fields['icon_url'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['keywords'] = "TEXT NOT NULL";
     $fields['overlay'] = "TEXT NOT NULL";
     $fields['overlay_id'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['rank'] = "INT UNSIGNED DEFAULT 10000 NOT NULL";
     $fields['source'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['thumbnail_url'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['title'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX active'] = "(active)";
     $indexes['INDEX anchor'] = "(anchor)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     $indexes['INDEX file_size'] = "(file_size)";
     $indexes['INDEX hits'] = "(hits)";
     $indexes['INDEX overlay_id'] = "(overlay_id)";
     $indexes['INDEX rank'] = "(rank)";
     $indexes['INDEX title'] = "(title(25))";
     $indexes['FULLTEXT INDEX'] = "full_text(title, source, keywords)";
     return SQL::setup_table('files', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:54,代码来源:files.php

示例2: setup

 /**
  * create tables for comments
  *
  * @see control/setup.php
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['anchor'] = "VARCHAR(64) DEFAULT 'section:1' NOT NULL";
     $fields['anchor_type'] = "VARCHAR(64) DEFAULT 'section' NOT NULL";
     $fields['anchor_id'] = "MEDIUMINT UNSIGNED NOT NULL";
     $fields['previous_id'] = "MEDIUMINT UNSIGNED DEFAULT 0 ";
     $fields['type'] = "VARCHAR(64) DEFAULT 'default' NOT NULL";
     $fields['description'] = "TEXT NOT NULL";
     $fields['create_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['create_id'] = "MEDIUMINT DEFAULT 0 NOT NULL";
     $fields['create_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['create_date'] = "DATETIME";
     $fields['edit_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_id'] = "MEDIUMINT DEFAULT 0 NOT NULL";
     $fields['edit_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_action'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_date'] = "DATETIME";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX anchor'] = "(anchor)";
     $indexes['INDEX anchor_id'] = "(anchor_id)";
     $indexes['INDEX anchor_type'] = "(anchor_type)";
     $indexes['INDEX create_date'] = "(create_date)";
     $indexes['INDEX create_id'] = "(create_id)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     $indexes['INDEX edit_id'] = "(edit_id)";
     $indexes['INDEX previous_id'] = "(previous_id)";
     $indexes['INDEX type'] = "(type)";
     $indexes['FULLTEXT INDEX'] = "full_text(description)";
     $views = array();
     $views[] = "CREATE OR REPLACE VIEW " . SQL::table_name('comments_by_person_per_month') . " AS" . " SELECT" . "  SUBSTRING(edit_date, 1, 7) AS month," . "  edit_id AS 'id'," . "  edit_name AS 'name'," . "  COUNT(id) AS 'contributions'" . " FROM " . SQL::table_name('comments') . " GROUP BY month, edit_name" . " ORDER BY month DESC, contributions DESC";
     $views[] = "CREATE OR REPLACE VIEW " . SQL::table_name('comments_by_anchor_per_month') . " AS" . " SELECT" . "  SUBSTRING(edit_date, 1, 7) AS month," . "  anchor," . "  COUNT(id) AS 'contributions'" . " FROM " . SQL::table_name('comments') . " GROUP BY month, anchor" . " ORDER BY month DESC, contributions DESC";
     return SQL::setup_table('comments', $fields, $indexes, $views);
 }
开发者ID:rair,项目名称:yacs,代码行数:42,代码来源:comments.php

示例3: setup

 /**
  * create table for values
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     // up to 255 chars
     $fields['value'] = "MEDIUMTEXT NOT NULL";
     // up to 16M chars
     $fields['edit_date'] = "DATETIME";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     return SQL::setup_table('values', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:17,代码来源:values.php

示例4: setup

 /**
  * create tables for users
  *
  * @see control/setup.php
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['active'] = "ENUM('Y','R','N') DEFAULT 'Y' NOT NULL";
     $fields['aim_address'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['alternate_number'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['authenticate_date'] = "DATETIME";
     $fields['authenticate_failures'] = "SMALLINT UNSIGNED DEFAULT 0 NOT NULL";
     $fields['avatar_url'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['birth_date'] = "DATETIME";
     $fields['capability'] = "ENUM('A','M','S','?') DEFAULT '?' NOT NULL";
     $fields['click_anchor'] = "VARCHAR(64) DEFAULT '' NOT NULL";
     $fields['click_date'] = "DATETIME";
     $fields['create_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['create_id'] = "MEDIUMINT UNSIGNED DEFAULT 1 NOT NULL";
     $fields['create_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['create_date'] = "DATETIME";
     $fields['description'] = "TEXT NOT NULL";
     $fields['edit_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_id'] = "MEDIUMINT UNSIGNED DEFAULT 1 NOT NULL";
     $fields['edit_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_action'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_date'] = "DATETIME";
     $fields['editor'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['email'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['full_name'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['from_where'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['handle'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['icq_address'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['interface'] = "ENUM('I','C') DEFAULT 'I' NOT NULL";
     $fields['introduction'] = "TEXT NOT NULL";
     $fields['irc_address'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['jabber_address'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['language'] = "VARCHAR(6) DEFAULT '' NOT NULL";
     $fields['login_address'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['login_date'] = "DATETIME";
     $fields['msn_address'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['nick_name'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['options'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['overlay'] = "TEXT NOT NULL";
     $fields['overlay_id'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['password'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['pgp_key'] = "TEXT NOT NULL";
     $fields['phone_number'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['post_date'] = "DATETIME";
     $fields['posts'] = "INT UNSIGNED DEFAULT 0 NOT NULL";
     $fields['signature'] = "TEXT NOT NULL";
     $fields['skype_address'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['tags'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['twitter_address'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['vcard_agent'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['vcard_label'] = "TEXT NOT NULL";
     $fields['vcard_organization'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['vcard_title'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['web_address'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['with_newsletters'] = "ENUM('Y','N') DEFAULT 'N' NOT NULL";
     $fields['without_alerts'] = "ENUM('Y','N') DEFAULT 'N' NOT NULL";
     $fields['without_confirmations'] = "ENUM('Y','N') DEFAULT 'N' NOT NULL";
     $fields['without_messages'] = "ENUM('Y','N') DEFAULT 'N' NOT NULL";
     $fields['yahoo_address'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX birth_date'] = "(birth_date)";
     $indexes['INDEX create_date'] = "(create_date)";
     $indexes['INDEX create_id'] = "(create_id)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     $indexes['INDEX edit_id'] = "(edit_id)";
     $indexes['INDEX email'] = "(email)";
     $indexes['INDEX full_name'] = "(full_name(255))";
     $indexes['INDEX handle'] = "(handle)";
     $indexes['INDEX login_date'] = "(login_date)";
     $indexes['INDEX nick_name'] = "(nick_name)";
     $indexes['INDEX overlay_id'] = "(overlay_id)";
     $indexes['INDEX post_date'] = "(post_date)";
     $indexes['INDEX posts'] = "(posts)";
     $indexes['INDEX with_newsletters'] = "(with_newsletters)";
     $indexes['FULLTEXT INDEX'] = "full_text(nick_name, full_name, introduction, description)";
     return SQL::setup_table('users', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:86,代码来源:users.php

示例5: setup

 /**
  * create tables for profiles
  *
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['url'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['total_hits'] = "INT UNSIGNED DEFAULT 0 NOT NULL";
     $fields['total_time'] = "DOUBLE UNSIGNED";
     $fields['minimum_time'] = "FLOAT UNSIGNED";
     $fields['maximum_time'] = "FLOAT UNSIGNED";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX url'] = "(url)";
     $indexes['INDEX hits'] = "(total_hits)";
     return SQL::setup_table('profiles', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:20,代码来源:profiles.php

示例6: setup

 /**
  * create or alter tables for tables
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['nick_name'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['anchor'] = "VARCHAR(64) DEFAULT 'section:1' NOT NULL";
     $fields['title'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['description'] = "TEXT NOT NULL";
     $fields['source'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['query'] = "TEXT NOT NULL";
     $fields['with_zoom'] = "ENUM('Y','T','N') DEFAULT 'N' NOT NULL";
     $fields['edit_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_id'] = "MEDIUMINT DEFAULT 0 NOT NULL";
     $fields['edit_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_date'] = "DATETIME";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX anchor'] = "(anchor)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     $indexes['INDEX edit_id'] = "(edit_id)";
     $indexes['INDEX nick_name'] = "(nick_name)";
     $indexes['INDEX title'] = "(title(255))";
     $indexes['FULLTEXT INDEX'] = "full_text(title, source, description)";
     $text = SQL::setup_table('tables', $fields, $indexes);
     return $text;
 }
开发者ID:rair,项目名称:yacs,代码行数:30,代码来源:tables.php

示例7: setup

 /**
  * create tables for referrals
  *
  * @see agents/referrals_hook.php
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['url'] = "TEXT NOT NULL";
     $fields['referer'] = "TEXT NOT NULL";
     $fields['domain'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['keywords'] = "VARCHAR(255) DEFAULT ''";
     $fields['hits'] = "INT UNSIGNED DEFAULT 0 NOT NULL";
     $fields['stamp'] = "DATETIME";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX url'] = "(url(255))";
     $indexes['INDEX referer'] = "(referer(255))";
     $indexes['INDEX domain'] = "(domain)";
     $indexes['INDEX keywords'] = "(keywords)";
     $indexes['INDEX hits'] = "(hits)";
     $indexes['INDEX stamp'] = "(stamp)";
     return SQL::setup_table('referrals', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:26,代码来源:referrals.php

示例8: setup

 /**
  * create table for notifications
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['recipient'] = "MEDIUMINT NOT NULL";
     $fields['edit_date'] = "DATETIME";
     $fields['data'] = "TEXT";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX recipient'] = "(recipient)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     return SQL::setup_table('notifications', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:17,代码来源:notifications.php

示例9: setup

 /**
  * create tables for members
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['anchor'] = "VARCHAR(64) NOT NULL";
     $fields['member'] = "VARCHAR(64) NOT NULL";
     $fields['member_type'] = "VARCHAR(64) NOT NULL";
     $fields['member_id'] = "VARCHAR(64) NOT NULL";
     $fields['edit_date'] = "DATETIME";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX anchor'] = "(anchor)";
     $indexes['INDEX member'] = "(member)";
     $indexes['INDEX member_type'] = "(member_type)";
     $indexes['INDEX member_id'] = "(member_id)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     return SQL::setup_table('members', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:22,代码来源:members.php

示例10: setup

 /**
  * create tables for the cache
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     // up to 255 chars
     $fields['text'] = "MEDIUMTEXT NOT NULL";
     // up to 16M chars
     $fields['topic'] = "VARCHAR(64) DEFAULT '' NOT NULL";
     // up to 64 chars
     $fields['edit_date'] = "DATETIME";
     // modification date
     $fields['expiry_date'] = "DATETIME";
     // expiry date
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX topic'] = "(topic)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     $indexes['INDEX expiry_date'] = "(expiry_date)";
     return SQL::setup_table('cache', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:24,代码来源:cache.php

示例11: setup

 /**
  * create table for visits
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['active'] = "ENUM('Y','R','N') DEFAULT 'Y' NOT NULL";
     // Yes, Restricted or No
     $fields['anchor'] = "VARCHAR(64) NOT NULL";
     $fields['edit_date'] = "DATETIME";
     $fields['user_id'] = "MEDIUMINT UNSIGNED";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX active'] = "(active)";
     $indexes['INDEX anchor'] = "(anchor)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     $indexes['INDEX user_id'] = "(user_id)";
     return SQL::setup_table('visits', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:21,代码来源:visits.php

示例12: setup

 /**
  * create table for categories
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['active'] = "ENUM('Y','R','N') DEFAULT 'Y' NOT NULL";
     $fields['active_set'] = "ENUM('Y','R','N') DEFAULT 'Y' NOT NULL";
     $fields['anchor'] = "VARCHAR(64)";
     $fields['articles_layout'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['background_color'] = "VARCHAR(64) DEFAULT '' NOT NULL";
     $fields['categories_count'] = "INT UNSIGNED NOT NULL";
     $fields['categories_layout'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['categories_overlay'] = "VARCHAR(64) DEFAULT '' NOT NULL";
     $fields['create_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['create_date'] = "DATETIME";
     $fields['create_id'] = "MEDIUMINT UNSIGNED DEFAULT 1 NOT NULL";
     $fields['create_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['description'] = "TEXT NOT NULL";
     $fields['display'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['edit_action'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_date'] = "DATETIME";
     $fields['edit_id'] = "MEDIUMINT UNSIGNED DEFAULT 1 NOT NULL";
     $fields['edit_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['expiry_date'] = "DATETIME";
     $fields['extra'] = "TEXT NOT NULL";
     $fields['hits'] = "INT UNSIGNED DEFAULT 0 NOT NULL";
     $fields['icon_url'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['introduction'] = "TEXT NOT NULL";
     $fields['keywords'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['nick_name'] = "VARCHAR(64) DEFAULT '' NOT NULL";
     $fields['options'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['overlay'] = "TEXT NOT NULL";
     $fields['overlay_id'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['owner_id'] = "MEDIUMINT UNSIGNED DEFAULT 0 NOT NULL";
     $fields['path'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['prefix'] = "TEXT NOT NULL";
     $fields['rank'] = "MEDIUMINT UNSIGNED DEFAULT 10000 NOT NULL";
     $fields['sections_layout'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['suffix'] = "TEXT NOT NULL";
     $fields['thumbnail_url'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['title'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['trailer'] = "TEXT NOT NULL";
     $fields['users_layout'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $indexes = array();
     $indexes['PRIMARY KEY id'] = "(id)";
     $indexes['INDEX active'] = "(active)";
     $indexes['INDEX anchor'] = "(anchor)";
     $indexes['INDEX create_date'] = "(create_date)";
     $indexes['INDEX create_id'] = "(create_id)";
     $indexes['INDEX display'] = "(display)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     $indexes['INDEX edit_id'] = "(edit_id)";
     $indexes['INDEX expiry_date'] = "(expiry_date)";
     $indexes['INDEX hits'] = "(hits)";
     $indexes['INDEX keywords'] = "(keywords(255))";
     $indexes['INDEX nick_name'] = "(nick_name)";
     $indexes['INDEX path'] = "(path(255))";
     $indexes['INDEX rank'] = "(rank)";
     $indexes['INDEX title'] = "(title(255))";
     $indexes['FULLTEXT INDEX'] = "full_text(title, introduction, description, keywords)";
     return SQL::setup_table('categories', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:66,代码来源:categories.php

示例13: setup

 /**
  * create table for js_css
  * to count js and css files calls over time
  *
  * @see control/setup.php
  */
 public static function setup()
 {
     $fields = array();
     $fields['id'] = "VARCHAR(32) NOT NULL";
     $fields['path'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['calls'] = "MEDIUMINT UNSIGNED DEFAULT 1 NOT NULL";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     return SQL::setup_table('js_css_calls', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:16,代码来源:js_css.php

示例14: setup

 /**
  * create tables for versions
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     $fields['anchor'] = "VARCHAR(64) NOT NULL";
     $fields['content'] = "MEDIUMTEXT NOT NULL";
     $fields['edit_address'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $fields['edit_date'] = "DATETIME";
     $fields['edit_id'] = "MEDIUMINT DEFAULT 0 NOT NULL";
     $fields['edit_name'] = "VARCHAR(128) DEFAULT '' NOT NULL";
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX anchor'] = "(anchor)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     return SQL::setup_table('versions', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:20,代码来源:versions.php

示例15: setup

 /**
  * create tables for queued messages
  */
 public static function setup()
 {
     global $context;
     $fields = array();
     $fields['id'] = "MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT";
     // up to 16m items
     $fields['edit_date'] = "DATETIME";
     $fields['headers'] = "TEXT NOT NULL";
     // up to 64k chars
     $fields['message'] = "MEDIUMTEXT NOT NULL";
     // up to 16M chars
     $fields['recipient'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     $fields['subject'] = "VARCHAR(255) DEFAULT '' NOT NULL";
     // up to 255 chars
     $indexes = array();
     $indexes['PRIMARY KEY'] = "(id)";
     $indexes['INDEX edit_date'] = "(edit_date)";
     return SQL::setup_table('messages', $fields, $indexes);
 }
开发者ID:rair,项目名称:yacs,代码行数:22,代码来源:mailer.php


注:本文中的SQL::setup_table方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。