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)
Sat, Apr 4, 16:04
Unknown Object (File)
Sat, Apr 4, 15:51
Unknown Object (File)
Sat, Apr 4, 15:51
Unknown Object (File)
Fri, Apr 3, 11:11
Unknown Object (File)
Thu, Apr 2, 06:39
Unknown Object (File)
Wed, Apr 1, 22:38
Unknown Object (File)
Wed, Apr 1, 22:15
Unknown Object (File)
Wed, Apr 1, 15:15
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