/ LJCPHPCodeDoc / LJCGenTextSectionLib / LJCSections / CreateColumnData


Parameters
$dbColumns - The table columns definition.
$tableName - The Table name.
$className - The Class name.

Returns

The sections array.

Syntax

PHP
public static function CreateColumnData(LJCDbColumns $dbColumns
, string $tableName, string $className = null) : LJCSections

Creates the data from a table definition.

Example

PHP
 include_once "LJCRoot.php";
 $prefix = RelativePrefix();
 include_once "$prefix/LJCPHPCommon/LJCDBAccessLib.php";
 include_once "$prefix/GenTextLib/LJCGenTextSectionLib.php";
 
 $dbAccess = new LJCDbAccess($connectionValues);
 
 $tableName = "TableName";
 $dbColumns = $dbAccess->LoadTableSchema($database, $tableName);
 
 // $sections is an LJCSections object.
 $sections = LJCSections::CreateColumnData($dbColumns, $tableName
 , "ClassName");

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.