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
Unknown Object (File)
Wed, Apr 29, 19:38
Unknown Object (File)
Tue, Apr 28, 00:58
Unknown Object (File)
Mon, Apr 27, 16:24
Unknown Object (File)
Sat, Apr 25, 21:38
Unknown Object (File)
Sat, Apr 25, 09:45
Unknown Object (File)
Sun, Apr 19, 16:01
Unknown Object (File)
Sat, Apr 18, 04:34
Unknown Object (File)
Thu, Apr 16, 05:36
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