Page MenuHomeDevCentral

Fetch database rows as both an associative and a numeric array
ClosedPublic

Authored by dereckson on Oct 19 2025, 22:03.
Tags
None
Referenced Files
F25147137: D3779.diff
Wed, Apr 1, 15:15
F25143644: D3779.id9789.diff
Wed, Apr 1, 10:34
Unknown Object (File)
Mon, Mar 30, 20:03
Unknown Object (File)
Mon, Mar 30, 10:23
Unknown Object (File)
Sat, Mar 28, 21:08
Unknown Object (File)
Fri, Mar 27, 16:27
Unknown Object (File)
Thu, Mar 26, 14:19
Unknown Object (File)
Thu, Mar 26, 10:17
Subscribers
None

Details

Summary

By default, keruald/database use associative array,
but the Obsidian code handle count(*) like this:

return ($row[0] == 1);

An alternative could be to use queryScalar() instead of query() for those.

Diff Detail

Repository
rOBSIDIAN Obsidian Workspaces
Lint
Lint Not Applicable
Unit
Tests Not Applicable