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 |
// Loads the records for the provided SQL statement.
private static function Load(LJCConnectionValues $connectionValues)
{
// See constructor for how to create $connectionValues.
$dbAccess = new LJCDbAccess($connectionValues);
$tableName = "TableName";
$sql = "select * from {$tableName};";
$rows = $dbAccess->Load($sql);
if (null == $rows
|| (is_array($rows)
&& count($rows) == 0))
{
echo("\r\nLoad() rows not found");
}
}
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.