/ LJCPHPCodeDoc / LJCDBAccessLib / LJCDbAccess / LoadTableSchema


Parameters
$dbName - The Database name.
$tableName - The Table name.

Returns

A DbColumns collection of column definitions.

Syntax

PHP
public function LoadTableSchema(string $dbName, string $tableName)

Returns the Table Schema DbColumns collection.

Example

PHP
 // Returns the Table Schema DbColumns collection.
 private static function LoadTableSchema(
     LJCConnectionValues $connectionValues)
 {
   // See constructor for how to create $connectionValues.
   $dbAccess = new LJCDbAccess($connectionValues);
 
   $dbName = "DatabaseName";
   $tableName = "TableName";
   $schema = $dbAccess->LoadTableSchema($dbName, $tableName);
   if (null == $schema
     || !$schema instanceof LJCDbColumns
     || count($schema) == 0)
   {
     echo("\r\nLoadTableSchema() The Schema was not retrieved.");
   }
 }

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