本文整理汇总了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;
}
示例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);
}
示例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>
示例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);
示例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);