diff --git a/lib/Db.php b/lib/Db.php index 25c22615..c746587f 100644 --- a/lib/Db.php +++ b/lib/Db.php @@ -21,7 +21,9 @@ class Db{ /** * Returns a single integer value for the first column database query result. - * This is useful for queries that return a single integer as a result, like count(*) or sum(*). + * + * This is useful for queries that return a single integer as a result, like `count(*)` or `sum(*)`. + * * @param string $query * @param array $args */ diff --git a/lib/DbConnection.php b/lib/DbConnection.php index 02d8b4ca..facd18c3 100644 --- a/lib/DbConnection.php +++ b/lib/DbConnection.php @@ -138,7 +138,7 @@ class DbConnection{ * ] * ``` * - * **Important note:** When joining against two tables, SQL only returns one column for the join key (typically an ID value). Therefore, if both objects require an ID, the filler method must explicitly assign the ID to one of the two objects that's missing it. The above example shows this behavior: note how we join on UserId, but only the Users result has the UserId column, even though the Posts table also has a UserId column. + * **Important note:** When joining against two tables, SQL only returns one column for the join key (typically an ID value). Therefore, if both objects require an ID, the filler method must explicitly assign the ID to one of the two objects that's missing it. The above example shows this behavior: note how we join on `UserId`, but only the `Users` result has the `UserId` column, even though the `Posts` table also has a `UserId` column. * * @template T * @@ -148,7 +148,7 @@ class DbConnection{ * * @return array|array> An array of `$class` if `$class` is not `null`, otherwise an array of rows. * - * @throws Exceptions\AppException If a class was specified but the class doesn't have a `FromMultiTableRow` method. + * @throws Exceptions\AppException If a class was specified but the class doesn't have a `FromMultiTableRow()` method. * @throws Exceptions\DatabaseQueryException When an error occurs during execution of the query. */ public function MultiTableSelect(string $sql, array $params = [], ?string $class = null): array{