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
F54164997: D3779.diff
Thu, Oct 15, 12:44
F54155203: D3779.id9790.diff
Thu, Oct 15, 09:59
Unknown Object (File)
Tue, Oct 13, 18:36
Unknown Object (File)
Mon, Oct 12, 20:25
Unknown Object (File)
Sun, Oct 11, 14:55
Unknown Object (File)
Sat, Oct 10, 15:17
Unknown Object (File)
Sat, Oct 10, 06:42
Unknown Object (File)
Mon, Oct 5, 05:00
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