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, Mar 14, 02:35
Unknown Object (File)
Sat, Mar 14, 02:35
Unknown Object (File)
Wed, Mar 11, 00:27
Unknown Object (File)
Wed, Mar 11, 00:16
Unknown Object (File)
Wed, Mar 11, 00:05
Unknown Object (File)
Tue, Mar 10, 16:21
Unknown Object (File)
Tue, Mar 10, 16:09
Unknown Object (File)
Mon, Mar 9, 19:16
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