Page MenuHomeDevCentral

Fetch database rows as both an associative and a numeric array
ClosedPublic

Authored by dereckson on Sun, Oct 19, 22:03.
Tags
None
Referenced Files
F12367325: D3779.id9789.diff
Thu, Oct 30, 03:00
F12367323: D3779.id9790.diff
Thu, Oct 30, 03:00
F12367289: D3779.id.diff
Thu, Oct 30, 02:54
F12367122: D3779.id9789.diff
Thu, Oct 30, 01:55
F12366843: D3779.id9790.diff
Thu, Oct 30, 01:01
Unknown Object (File)
Tue, Oct 28, 09:05
Unknown Object (File)
Tue, Oct 28, 00:18
Unknown Object (File)
Mon, Oct 27, 23:07
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