/ LJCPHPCodeDoc / LJCDBAccessLib / LJCDbAccess / Load


Parameters
$sql - The SQL statement.

Returns

An array of data records.

Syntax

PHP
public function Load(string $sql) : ?array

Loads the records for the provided SQL statement.

Example

PHP
 $webCommonPath = "c:/inetpub/wwwroot/LJCPHPCommon";
 require_once "$webCommonPath/LJCDBAccessLib.php";
 
 // See constructor for how to create $connectionValues.
 $dbAccess = new LJCDbAccess($connectionValues);
 
 $tableName = "TableName";
 $sql = "select * from $tableName";
 $rows = $dbAccess->Load($sql);

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