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)
Tue, Aug 18, 07:02
Unknown Object (File)
Wed, Aug 12, 03:04
Unknown Object (File)
Tue, Aug 11, 15:00
Unknown Object (File)
Mon, Aug 10, 23:25
Unknown Object (File)
Mon, Aug 10, 07:46
Unknown Object (File)
Sun, Aug 9, 21:46
Unknown Object (File)
Sat, Aug 8, 07:32
Unknown Object (File)
Thu, Aug 6, 03:25
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