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


PHP table::getFieldNameArray方法代码示例

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


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

示例1: generate

 function generate()
 {
     $this->appendSuperHeader();
     $code = "";
     $tables = $this->getTablesArray();
     $code .= $this->getCodeStarter();
     for ($a = 0; $a < count($tables); $a++) {
         $thisTable = new table($tables[$a], $this->getDb());
         $fields = $thisTable->getFieldNameArray();
         $code .= $this->getLineEnder();
         $code .= "// " . $thisTable->getTableName() . " Table" . $this->getLineEnder();
         $code .= "define(\"TABLE_" . strtoupper($tables[$a]) . "\",\"" . $thisTable->getTableName() . "\");" . $this->getLineEnder();
         $code .= "// Primary Key for Table " . $thisTable->getTableName() . $this->getLineEnder();
         $code .= "define(\"FIELD_" . strtoupper($tables[$a]) . "_PK\",\"" . $thisTable->getPrimaryKey() . "\");" . $this->getLineEnder();
         $code .= "// Field Name Mapping for Table " . $thisTable->getTableName() . $this->getLineEnder();
         for ($b = 0; $b < count($fields); $b++) {
             $code .= "define(\"FIELD_" . strtoupper($tables[$a]) . "_" . strtoupper($fields[$b]) . "\",\"" . $fields[$b] . "\");" . $this->getLineEnder();
         }
         $code .= "// Display Labels of Field for Table " . $thisTable->getTableName() . $this->getLineEnder();
         for ($c = 0; $c < count($fields); $c++) {
             $code .= "define(\"LABEL_" . strtoupper($tables[$a]) . "_" . strtoupper($fields[$c]) . "\",\"" . ucfirst(strtolower($fields[$c])) . "\");" . $this->getLineEnder();
         }
         $code .= $this->getLineEnder();
     }
     $code .= $this->getCodeEnder();
     $this->appendToCode($code);
     $beautifulCode = codeBeautifier::beautify($this->getSourceCode());
     return $beautifulCode;
 }
开发者ID:juddy,项目名称:GIP,代码行数:29,代码来源:genieCommonDbConstantsGenerator.plugin.class.php

示例2: selectKeywordGenerator

 function selectKeywordGenerator($table, $db, $selectedFieldsArray = "", $orderByArray = "", $orderDirection = "", $startLimit = "", $numOfRows = "", $distinct = "", $wherePk = "")
 {
     $thisTable = new table($table, $db);
     $fieldNames = $thisTable->getFieldNameArray();
     $whereString = " WHERE ";
     $fieldCount = count($fieldNames);
     for ($c = 0; $c < $fieldCount; $c++) {
         $whereString .= $fieldNames[$c] . " like '%\$thisKeyword%' ";
         if ($c != $fieldCount - 1) {
             $whereString .= " OR ";
         }
     }
     $this->setWhereString($whereString);
     $this->constructSQL($thisTable);
 }
开发者ID:juddy,项目名称:GIP,代码行数:15,代码来源:selectKeywordGenerator.class.php

示例3: array

<?php

include_once "//var/www/gip/app/settings/gipConfiguration.inc.php";
include_once INC_SUPERHEADER;
include_once CLASS_TABLE;
$arguments = array();
$arguments['db'] = requestUtils::getRequestObject('db');
$arguments['table'] = requestUtils::getRequestObject('table');
$arguments['headerText'] = "";
$arguments['footerText'] = "";
$thisTable = new table($arguments['table'], $arguments['db']);
$fieldNames = $thisTable->getFieldNameArray();
?>
 
<h2>Please choose what you want in your Insert Code?</h2>
<form name="libraryPreInsertForm" method="POST" action="simpleInsertScriptGenerator.php">
<input type="hidden" name="table" value="<?php 
echo $arguments['table'];
?>
">
<input type="hidden" name="db" value="<?php 
echo $arguments['db'];
?>
">


<table>
<tr valign=top>
<td><h3>Header : </h3></td>
<td><input type="checkbox" name="header" value="" checked> </td>
</tr>
开发者ID:juddy,项目名称:GIP,代码行数:31,代码来源:preSimpleInsertScriptGenerator.php

示例4: plugInLoader

<?php

include_once "//var/www/gip/app/settings/gipConfiguration.inc.php";
include_once INC_SUPERHEADER;
include_once CLASS_TABLE;
include_once CLASS_PLUGIN_LOADER;
$thisPlugInLoader = new plugInLoader();
$arguments = array();
$arguments['db'] = requestUtils::getRequestObject('db');
$arguments['table'] = requestUtils::getRequestObject('table');
$arguments['headerText'] = "";
$arguments['footerText'] = "";
$thisTable = new table($arguments['table'], $arguments['db']);
$allFields = $thisTable->getFieldNameArray();
$fields = requestUtils::getRequestObject("chosenFieldName");
for ($a = 0; $a < count($allFields); $a++) {
    $fieldSize[$allFields[$a]] = requestUtils::getRequestObject("size" . $allFields[$a]);
    $fieldType[$allFields[$a]] = requestUtils::getRequestObject("inputType" . $allFields[$a]);
    $fieldLabel[$allFields[$a]] = requestUtils::getRequestObject("label" . $allFields[$a]);
}
$arguments['chosenFields'] = requestUtils::getRequestObject('chosenFieldName');
$arguments['fieldSize'] = $fieldSize;
$arguments['fieldType'] = $fieldType;
$arguments['label'] = $fieldLabel;
$arguments['formType'] = requestUtils::getRequestObject('formType');
$generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_ENTER_FORM_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_ENTER_FORM_GENERATOR_CLASS, $arguments);
highlight_string($generatedCode);
开发者ID:juddy,项目名称:GIP,代码行数:27,代码来源:simpleEnterFormGenerator.php

示例5: plugInLoader

<?php

include_once "//var/www/gip/app/settings/gipConfiguration.inc.php";
include_once INC_SUPERHEADER;
include_once CLASS_PLUGIN_LOADER;
include_once CLASS_TABLE;
$thisPlugInLoader = new plugInLoader();
$arguments = array();
$thisDb = requestUtils::getRequestObject('db');
$thisTable = requestUtils::getRequestObject('table');
$tableObject = new table($thisTable, $thisDb);
$arguments['variables'] = $tableObject->getFieldNameArray();
$arguments['functions'] = array();
$arguments['className'] = strtolower($thisTable) . ucfirst(strtolower(NAME_DATA_CONTAINER));
$generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_CLASS_GENERATOR_NAME, PLUGIN_PHP_CLASS_GENERATOR_CLASS, $arguments);
highlight_string($generatedCode);
开发者ID:juddy,项目名称:GIP,代码行数:16,代码来源:frameworkInfoClassGenerator.php


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