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


PHP rex_sql::showColumns方法代码示例

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


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

示例1: rex_a62_metainfo_cleanup

/**
 * Alle Metafelder löschen, nicht das nach einem Import in der Parameter Tabelle
 * noch Datensätze zu Feldern stehen, welche nicht als Spalten in der
 * rex_article angelegt wurden!
 */
function rex_a62_metainfo_cleanup($params)
{
    global $REX;
    // Cleanup nur durchführen, wenn auch die rex_article Tabelle neu angelegt wird
    if (isset($params['force']) && $params['force'] != true && strpos($params['content'], 'CREATE TABLE `' . $REX['TABLE_PREFIX'] . 'article`') === false && strpos($params['content'], 'CREATE TABLE ' . $REX['TABLE_PREFIX'] . 'article') === false) {
        return;
    }
    require_once $REX['INCLUDE_PATH'] . '/addons/metainfo/classes/class.rex_table_manager.inc.php';
    $sql = new rex_sql();
    $sql->setQuery('SELECT name FROM ' . $REX['TABLE_PREFIX'] . '62_params');
    for ($i = 0; $i < $sql->getRows(); $i++) {
        if (substr($sql->getValue('name'), 0, 4) == 'med_') {
            $tableManager = new rex_a62_tableManager($REX['TABLE_PREFIX'] . 'file');
        } else {
            $tableManager = new rex_a62_tableManager($REX['TABLE_PREFIX'] . 'article');
        }
        $tableManager->deleteColumn($sql->getValue('name'));
        $sql->next();
    }
    // evtl reste aufräumen
    $tablePrefixes = array('article' => array('art_', 'cat_'), 'file' => array('med_'));
    foreach ($tablePrefixes as $table => $prefixes) {
        $table = $REX['TABLE_PREFIX'] . $table;
        $tableManager = new rex_a62_tableManager($table);
        foreach (rex_sql::showColumns($table) as $column) {
            $column = $column['name'];
            if (in_array(substr($column, 0, 4), $prefixes)) {
                $tableManager->deleteColumn($column);
            }
        }
    }
    $sql = new rex_sql();
    $sql->setQuery('DELETE FROM ' . $REX['TABLE_PREFIX'] . '62_params');
    rex_generateAll();
}
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:40,代码来源:extension_cleanup.inc.php

示例2: hasColumn

 public function hasColumn($name)
 {
     $columns = rex_sql::showColumns($this->getTableName(), $this->DBID);
     foreach ($columns as $column) {
         if ($column['name'] == $name) {
             return true;
         }
     }
     return false;
 }
开发者ID:staabm,项目名称:redaxo,代码行数:10,代码来源:table_manager.php

示例3: rex_metainfo_cleanup

/**
 * Alle Metafelder löschen, nicht das nach einem Import in der Parameter Tabelle
 * noch Datensätze zu Feldern stehen, welche nicht als Spalten in der
 * rex_article angelegt wurden!
 */
function rex_metainfo_cleanup($epOrParams)
{
    $params = $epOrParams instanceof rex_extension_point ? $epOrParams->getParams() : $epOrParams;
    // Cleanup nur durchführen, wenn auch die rex_article Tabelle neu angelegt wird
    if (isset($params['force']) && $params['force'] != true && strpos($params['content'], 'CREATE TABLE `' . rex::getTablePrefix() . 'article`') === false && strpos($params['content'], 'CREATE TABLE ' . rex::getTablePrefix() . 'article') === false) {
        return;
    }
    // check wheter tables exists
    $tables = rex_sql::showTables();
    if (!isset($tables[rex::getTablePrefix() . 'metainfo_field'])) {
        return false;
    }
    // since this extension may be used also when the addon is not yet installed,
    // require needed classes manually
    require_once __DIR__ . '/../lib/table_manager.php';
    $sql = rex_sql::factory();
    $sql->setQuery('SELECT name FROM ' . rex::getTablePrefix() . 'metainfo_field');
    for ($i = 0; $i < $sql->getRows(); ++$i) {
        if (substr($sql->getValue('name'), 0, 4) == 'med_') {
            $tableManager = new rex_metainfo_table_manager(rex::getTablePrefix() . 'media');
        } else {
            $tableManager = new rex_metainfo_table_manager(rex::getTablePrefix() . 'article');
        }
        $tableManager->deleteColumn($sql->getValue('name'));
        $sql->next();
    }
    // evtl reste aufräumen
    $tablePrefixes = ['article' => ['art_', 'cat_'], 'media' => ['med_']];
    foreach ($tablePrefixes as $table => $prefixes) {
        $table = rex::getTablePrefix() . $table;
        $tableManager = new rex_metainfo_table_manager($table);
        foreach (rex_sql::showColumns($table) as $column) {
            $column = $column['name'];
            if (in_array(substr($column, 0, 4), $prefixes)) {
                $tableManager->deleteColumn($column);
            }
        }
    }
    $sql = rex_sql::factory();
    $sql->setQuery('DELETE FROM ' . rex::getTablePrefix() . 'metainfo_field');
}
开发者ID:staabm,项目名称:redaxo,代码行数:46,代码来源:extension_cleanup.php

示例4: getDataListQuery

 public function getDataListQuery($rex_yform_filter = array(), $searchObject)
 {
     $sql = 'select * from ' . $this->table->getTablename() . ' t0';
     $sql_felder = rex_sql::factory();
     $sql_felder->setQuery('SELECT * FROM ' . rex_yform_manager_field::table() . ' WHERE table_name="' . $this->table->getTablename() . '" AND type_id="value" ORDER BY prio');
     $max = $sql_felder->getRows();
     if ($max > 0) {
         $existingFields = array_map(function ($column) {
             return $column['name'];
         }, rex_sql::showColumns($this->table->getTablename()));
         $fields = array();
         for ($i = 0; $i < $sql_felder->getRows(); $i++) {
             if (in_array($sql_felder->getValue('name'), $existingFields)) {
                 $fields[] = '`' . $sql_felder->getValue('name') . '`';
             } else {
                 $fields[] = 'NULL AS `' . $sql_felder->getValue('name') . '`';
             }
             $sql_felder->next();
         }
         $sql = 'select `id`,' . implode(',', $fields) . ' from `' . $this->table->getTablename() . '` t0';
     }
     $sql .= $this->getDataListQueryWhere($rex_yform_filter, $searchObject);
     if ($this->table->getSortFieldName() != "") {
         $sql .= ' ORDER BY `' . $this->table->getSortFieldName() . '` ' . $this->table->getSortOrderName();
     }
     $sql = rex_extension::registerPoint(new rex_extension_point('YFORM_DATA_LIST_SQL', $sql, array('table' => $this->table)));
     return $sql;
 }
开发者ID:VIEWSION,项目名称:redaxo_yform,代码行数:28,代码来源:manager.php

示例5: getColumns

 public function getColumns()
 {
     $columns = rex_sql::showColumns($this->getTableName());
     $c = array();
     foreach ($columns as $column) {
         $c[$column['name']] = $column;
     }
     unset($c['id']);
     return $c;
 }
开发者ID:xong,项目名称:redaxo_yform,代码行数:10,代码来源:table.php

示例6: foreach

     foreach ($REX['CLANG'] as $key => $value) {
         $select->addOption($value, $key);
     }
 }
 $field =& $form->addSelectField('table');
 $field->setLabel($I18N->msg('b_table'));
 $field->setAttribute('onchange', 'url_generate_table(this);');
 $field->setAttribute('style', 'width: 200px;');
 $select =& $field->getSelect();
 $select->setSize(1);
 $select->addOption($I18N->msg('b_no_table_selected'), '');
 $fields = array();
 $tables = rex_sql::showTables();
 foreach ($tables as $table) {
     $select->addOption($table, $table);
     $columns = rex_sql::showColumns($table);
     foreach ($columns as $column) {
         $fields[$table][] = $column['name'];
     }
 }
 $table_id = $field->getAttribute('id');
 $fieldContainer =& $form->addContainerField('table_parameters');
 $fieldContainer->setAttribute('style', 'display: none');
 if (count($fields > 0)) {
     foreach ($fields as $table => $columns) {
         $group = $table;
         $options = $columns;
         $type = 'select';
         $name = $table . '_name';
         $f1 =& $fieldContainer->addGroupedField($group, $type, $name, $value, $attributes = array());
         $f1->setHeader('<div class="url-control-grid3col">');
开发者ID:ReggaePanda,项目名称:redaxo_plugin_url_control,代码行数:31,代码来源:url_generate.php

示例7: foreach

<?php

slice_ui::emptyClipboard(1);
$fields = ['active', 'online_from', 'online_to'];
$cols = rex_sql::showColumns(rex::getTablePrefix() . 'article_slice');
foreach ($fields as $fieldname) {
    $found = false;
    foreach ($cols as $field) {
        if ($field['name'] === $fieldname) {
            $found = true;
            break;
        }
    }
    if ($found) {
        $sql = rex_sql::factory();
        $sql->setQuery("ALTER TABLE `" . rex::getTablePrefix() . 'article_slice' . "` DROP " . $fieldname, array());
    }
}
开发者ID:nilsology,项目名称:slice_ui,代码行数:18,代码来源:uninstall.php

示例8:

global $REX;
if (!class_exists('rex_asd_news_config')) {
    include_once __DIR__ . '/classes/rex_asd_news_config.php';
}
rex_asd_news_config::init('asd_news', 'asd_news', 'asd_news_category');
$REX['ADDON']['update'][rex_asd_news_config::getName()] = 1;
$REX['ADDON']['updatemsg'][rex_asd_news_config::getName()] = '';
// Check if in AddonData the config file exists
rex_asd_news_config::createDataConfigIfNotExists();
// Update Config
rex_asd_news_config::saveConfig();
// Update 1.4
// check if old fields exists
$sql = new rex_sql();
$rows = $sql->showColumns(rex_asd_news_config::getTable());
$metaCols = false;
foreach ($rows as $row) {
    if ($row['name'] == 'category') {
        $metaCols = true;
        break;
    }
}
if (!OOAddon::isAvailable('metainfo')) {
    $REX['ADDON']['update'][rex_asd_news_config::getName()] = 0;
    $REX['ADDON']['updatemsg'][rex_asd_news_config::getName()] = 'Metainfo Addon nicht gefunden';
}
if (OOAddon::isAvailable('metainfo') && $metaCols) {
    include_once __DIR__ . '/classes/metainfo/rex_asd_metainfo_install.php';
    rex_asd_metainfo_install::setProperty();
    if ($error = rex_asd_metainfo_install::addFields()) {
开发者ID:Sysix,项目名称:asd_news,代码行数:30,代码来源:update.inc.php

示例9: createMissingFieldColumns

 static function createMissingFieldColumns($field)
 {
     $columns = array();
     foreach (rex_sql::showColumns(rex_xform_manager_field::table()) as $column) {
         $columns[$column['name']] = true;
     }
     $alterTable = array();
     foreach ($field as $column => $value) {
         if (!isset($columns[$column])) {
             $alterTable[] = 'ADD `' . mysql_real_escape_string($column) . '` TEXT NOT NULL';
         }
         $columns[$column] = true;
     }
     if (count($alterTable)) {
         $alter = rex_sql::factory();
         $alter->debugsql = self::$debug;
         $alter->setQuery('ALTER TABLE `' . rex_xform_manager_field::table() . '` ' . implode(',', $alterTable));
     }
 }
开发者ID:alexbarnhill,项目名称:redaxo_xform,代码行数:19,代码来源:class.rex_xform_manager_table_api.inc.php

示例10: executeAction

 function executeAction()
 {
     // START - Spezialfall "be_em_relation"
     /*
     $be_em_table_field = "";
     if($this->params["value_pool"]["sql"]["type_name"] == "be_em_relation")
     {
         $be_em_table_field = $this->params["value_pool"]["sql"]["f1"];
         $this->params["value_pool"]["sql"]["f1"] = $this->params["value_pool"]["sql"]["f3"]."_".$this->params["value_pool"]["sql"]["f1"];
     }
     */
     // ENDE - Spezialfall
     // ********************************* TABLE A
     // $this->params["debug"]= TRUE;
     $sql = rex_sql::factory();
     if ($this->params['debug']) {
         $sql->debugsql = true;
     }
     $main_table = '';
     if ($this->getElement(2) != '') {
         $main_table = $this->getElement(2);
     } else {
         $main_table = $this->params['main_table'];
     }
     if ($main_table == '') {
         $this->params['form_show'] = true;
         $this->params['hasWarnings'] = true;
         $this->params['warning_messages'][] = $this->params['Error-Code-InsertQueryError'];
         return false;
     }
     $columns = array();
     foreach (rex_sql::showColumns($main_table) as $column) {
         $columns[$column['name']] = true;
     }
     $alterTable = array();
     foreach ($this->params['value_pool']['sql'] as $field => $value) {
         if ($value != '' && !isset($columns[$field])) {
             $alterTable[] = 'ADD `' . $field . '` TEXT NOT NULL';
             $columns[$field] = true;
         }
         /*if (!$value && isset($columns[$field])) {
               $sql->setQuery('SELECT 1 FROM `' . mysql_real_escape_string($main_table) . '` WHERE `' . mysql_real_escape_string($field) . '` LIMIT 1');
               if (!$sql->getRows()) {
                   $alterTable[] = 'DROP `' . mysql_real_escape_string($field) . '`';
                   unset($columns[$field]);
               }
           }*/
     }
     if ($alterTable) {
         $sql->setQuery('ALTER TABLE `' . $main_table . '` ' . implode(',', $alterTable));
     }
     $sql->setTable($main_table);
     $where = '';
     if (trim($this->getElement(3)) != '') {
         $where = trim($this->getElement(3));
     }
     // SQL Objekt mit Werten f�llen
     foreach ($this->params['value_pool']['sql'] as $key => $value) {
         if (isset($columns[$key])) {
             $sql->setValue($key, $value);
         }
         if ($where != '') {
             $where = str_replace('###' . $key . '###', addslashes($value), $where);
         }
     }
     if ($where != '') {
         $sql->setWhere($where);
         $sql->update();
         $flag = 'update';
     } else {
         $sql->insert();
         $flag = 'insert';
         $id = $sql->getLastId();
         $this->params['value_pool']['email']['ID'] = $id;
         $this->params['main_id'] = $id;
         // $this->params["value_pool"]["sql"]["ID"] = $id;
         if ($id == 0) {
             $this->params['form_show'] = true;
             $this->params['hasWarnings'] = true;
             $this->params['warning_messages'][] = $this->params['Error-Code-InsertQueryError'];
         }
     }
     return;
 }
开发者ID:VIEWSION,项目名称:redaxo_yform,代码行数:84,代码来源:manage_db.php

示例11: a587_getSettingsFormSection

echo a587_getSettingsFormSection('a587_highlight', $I18N->Msg('a587_settings_highlight_header'), array(array('type' => 'string', 'id' => 'a587_rexsearch_surroundtags_start', 'name' => 'a587_rexsearch[surroundtags][0]', 'label' => $I18N->Msg('a587_settings_surroundtags_start'), 'value' => isset($REX['ADDON']['settings']['rexsearch']['surroundtags'][0]) ? htmlspecialchars($REX['ADDON']['settings']['rexsearch']['surroundtags'][0]) : ''), array('type' => 'string', 'id' => 'a587_rexsearch_surroundtags_end', 'name' => 'a587_rexsearch[surroundtags][1]', 'label' => $I18N->Msg('a587_settings_surroundtags_end'), 'value' => isset($REX['ADDON']['settings']['rexsearch']['surroundtags'][1]) ? htmlspecialchars($REX['ADDON']['settings']['rexsearch']['surroundtags'][1]) : ''), array('type' => 'hidden', 'name' => 'a587_rexsearch[limit][0]', 'value' => '0'), array('type' => 'string', 'id' => 'a587_rexsearch_limit', 'name' => 'a587_rexsearch[limit][1]', 'label' => $I18N->Msg('a587_settings_limit'), 'value' => isset($REX['ADDON']['settings']['rexsearch']['limit'][1]) ? intval($REX['ADDON']['settings']['rexsearch']['limit'][1]) : ''), array('type' => 'string', 'id' => 'a587_rexsearch_maxteaserchars', 'name' => 'a587_rexsearch[maxteaserchars]', 'label' => $I18N->Msg('a587_settings_maxteaserchars'), 'value' => isset($REX['ADDON']['settings']['rexsearch']['maxteaserchars']) ? intval($REX['ADDON']['settings']['rexsearch']['maxteaserchars']) : ''), array('type' => 'string', 'id' => 'a587_rexsearch_maxhighlightchars', 'name' => 'a587_rexsearch[maxhighlightchars]', 'label' => $I18N->Msg('a587_settings_maxhighlightchars'), 'value' => isset($REX['ADDON']['settings']['rexsearch']['maxhighlightchars']) ? intval($REX['ADDON']['settings']['rexsearch']['maxhighlightchars']) : ''), array('type' => 'select', 'id' => 'a587_rexsearch_highlight', 'name' => 'a587_rexsearch[highlight]', 'label' => $I18N->Msg('a587_settings_highlight_label'), 'options' => array(array('value' => 'sentence', 'selected' => $REX['ADDON']['settings']['rexsearch']['highlight'] == 'sentence', 'name' => $I18N->Msg('a587_settings_highlight_sentence')), array('value' => 'paragraph', 'selected' => $REX['ADDON']['settings']['rexsearch']['highlight'] == 'paragraph', 'name' => $I18N->Msg('a587_settings_highlight_paragraph')), array('value' => 'surroundtext', 'selected' => $REX['ADDON']['settings']['rexsearch']['highlight'] == 'surroundtext', 'name' => $I18N->Msg('a587_settings_highlight_surroundtext')), array('value' => 'surroundtextsingle', 'selected' => $REX['ADDON']['settings']['rexsearch']['highlight'] == 'surroundtextsingle', 'name' => $I18N->Msg('a587_settings_highlight_surroundtextsingle')), array('value' => 'teaser', 'selected' => $REX['ADDON']['settings']['rexsearch']['highlight'] == 'teaser', 'name' => $I18N->Msg('a587_settings_highlight_teaser')), array('value' => 'array', 'selected' => $REX['ADDON']['settings']['rexsearch']['highlight'] == 'array', 'name' => $I18N->Msg('a587_settings_highlight_array')))), array('type' => 'directoutput', 'output' => '<div class="rex-form-row">' . $sampleoutput . '</div>')));
$categories = array();
foreach (a587_getCategories() as $id => $name) {
    $categories[] = array('value' => $id, 'selected' => !empty($REX['ADDON']['settings']['rexsearch']['exclude_category_ids']) and is_array($REX['ADDON']['settings']['rexsearch']['exclude_category_ids']) and in_array($id, $REX['ADDON']['settings']['rexsearch']['exclude_category_ids']), 'name' => $name . ' (' . $id . ')');
}
$articles = array();
foreach (a587_getArticles() as $id => $name) {
    $articles[] = array('value' => $id, 'selected' => !empty($REX['ADDON']['settings']['rexsearch']['exclude_article_ids']) and is_array($REX['ADDON']['settings']['rexsearch']['exclude_article_ids']) and in_array($id, $REX['ADDON']['settings']['rexsearch']['exclude_article_ids']), 'name' => $name . ' (' . $id . ')');
}
echo a587_getSettingsFormSection('a587_exclude', $I18N->Msg('a587_settings_exclude'), array(array('type' => 'string', 'id' => 'a587_settings_exclude_blacklist', 'name' => 'a587_rexsearch[blacklist]', 'label' => $I18N->Msg('a587_settings_exclude_blacklist'), 'value' => isset($REX['ADDON']['settings']['rexsearch']['blacklist']) ? htmlspecialchars(implode(',', $REX['ADDON']['settings']['rexsearch']['blacklist'])) : ''), array('type' => 'multipleselect', 'id' => 'a587_rexsearch_exclude_article_ids', 'name' => 'a587_rexsearch[exclude_article_ids][]', 'label' => $I18N->Msg('a587_settings_exclude_articles'), 'size' => 15, 'options' => $articles), array('type' => 'multipleselect', 'id' => 'a587_rexsearch_exclude_category_ids', 'name' => 'a587_rexsearch[exclude_category_ids][]', 'label' => $I18N->Msg('a587_settings_exclude_categories'), 'size' => 15, 'options' => $categories)));
$options = array();
$sql_tables = new rex_sql();
foreach ($sql_tables->showTables() as $table) {
    if (false === strpos($table, '587_search') and false === strpos($table, '587_keywords')) {
        $sql_columns = new rex_sql();
        foreach ($sql_tables->showColumns($table) as $column) {
            /*switch(strtolower(substr($column['type'],0,4)))
              {
                case 'text':
                case 'char':
                case 'varc':*/
            $options[] = array('value' => htmlspecialchars($table . '`.`' . $column['name']), 'checked' => in_array($column['name'], (!empty($REX['ADDON']['settings']['rexsearch']['include'][$table]) and is_array($REX['ADDON']['settings']['rexsearch']['include'][$table])) ? $REX['ADDON']['settings']['rexsearch']['include'][$table] : array()), 'name' => $table . '  .  ' . $column['name'], 'id' => $table . '  .  ' . $column['name']);
            //}
        }
    }
}
echo a587_getSettingsFormSection('a587_include', $I18N->Msg('a587_settings_include'), array(array('type' => 'multiplecheckboxes', 'id' => 'a587_rexsearch_include', 'name' => 'a587_rexsearch[include][]', 'label' => '', 'size' => 20, 'options' => $options)));
$options = array(array('value' => '', 'name' => '', 'selected' => false, 'id' => 'a587_optiondummy'));
if (!empty($REX['ADDON']['settings']['rexsearch']['indexfolders'])) {
    foreach ($REX['ADDON']['settings']['rexsearch']['indexfolders'] as $relative) {
        $options[] = array('value' => $relative, 'name' => $relative, 'selected' => true);
开发者ID:olien,项目名称:rexsearch,代码行数:31,代码来源:settings.inc.php

示例12: foreach

<?php

/**
 * MetaForm Addon.
 *
 * @author markus[dot]staab[at]redaxo[dot]de Markus Staab
 *
 * @package redaxo5
 *
 * @var rex_addon $this
 */
rex_sql_util::importDump($this->getPath('_install.sql'));
$tablePrefixes = ['article' => ['art_', 'cat_'], 'media' => ['med_'], 'clang' => ['clang_']];
$columns = ['article' => [], 'media' => [], 'clang' => []];
foreach ($tablePrefixes as $table => $prefixes) {
    foreach (rex_sql::showColumns(rex::getTable($table)) as $column) {
        $column = $column['name'];
        $prefix = substr($column, 0, 4);
        if (in_array(substr($column, 0, 4), $prefixes)) {
            $columns[$table][$column] = true;
        }
    }
}
$sql = rex_sql::factory();
$sql->setQuery('SELECT p.name, p.default, t.dbtype, t.dblength FROM ' . rex::getTable('metainfo_field') . ' p, ' . rex::getTable('metainfo_type') . ' t WHERE p.type_id = t.id');
$rows = $sql->getRows();
$managers = ['article' => new rex_metainfo_table_manager(rex::getTable('article')), 'media' => new rex_metainfo_table_manager(rex::getTable('media')), 'clang' => new rex_metainfo_table_manager(rex::getTable('clang'))];
for ($i = 0; $i < $sql->getRows(); ++$i) {
    $column = $sql->getValue('name');
    if (substr($column, 0, 4) == 'med_') {
        $table = 'media';
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:install.php

示例13: rex_install_dump

 *
 * @author markus[dot]staab[at]redaxo[dot]de Markus Staab
 *
 * @package redaxo4
 * @version svn:$Id$
 */
$error = '';
$result = rex_install_dump($REX['INCLUDE_PATH'] . '/addons/metainfo/_install.sql');
if ($result !== true) {
    $error = $result;
} else {
    require_once $REX['INCLUDE_PATH'] . '/addons/metainfo/classes/class.rex_table_manager.inc.php';
    $tablePrefixes = array('article' => array('art_', 'cat_'), 'file' => array('med_'));
    $columns = array('article' => array(), 'file' => array());
    foreach ($tablePrefixes as $table => $prefixes) {
        foreach (rex_sql::showColumns($REX['TABLE_PREFIX'] . $table) as $column) {
            $column = $column['name'];
            $prefix = substr($column, 0, 4);
            if (in_array(substr($column, 0, 4), $prefixes)) {
                $columns[$table][$column] = true;
            }
        }
    }
    $sql = rex_sql::factory();
    $sql->setQuery('SELECT p.name, p.default, t.dbtype, t.dblength FROM ' . $REX['TABLE_PREFIX'] . '62_params p, ' . $REX['TABLE_PREFIX'] . '62_type t WHERE p.type = t.id');
    $rows = $sql->getRows();
    $managers = array('article' => new rex_a62_tableManager($REX['TABLE_PREFIX'] . 'article'), 'file' => new rex_a62_tableManager($REX['TABLE_PREFIX'] . 'file'));
    for ($i = 0; $i < $sql->getRows(); $i++) {
        $column = $sql->getValue('name');
        if (substr($column, 0, 4) == 'med_') {
            $table = 'file';
开发者ID:Barnhiac,项目名称:MTW_REDAXO,代码行数:31,代码来源:install.inc.php


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