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
F23410475: D3779.id9790.diff
Wed, Feb 4, 19:33
F23367477: D3779.id.diff
Wed, Feb 4, 13:51
F23339518: D3779.id9790.diff
Wed, Feb 4, 08:02
Unknown Object (File)
Wed, Feb 4, 00:44
Unknown Object (File)
Tue, Feb 3, 00:15
Unknown Object (File)
Sun, Feb 1, 07:06
Unknown Object (File)
Sat, Jan 31, 06:30
Unknown Object (File)
Fri, Jan 30, 16:39
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