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
F12351498: D3779.id9789.diff
Tue, Oct 28, 00:18
F12351329: D3779.id.diff
Mon, Oct 27, 23:07
F12345058: D3779.diff
Mon, Oct 27, 04:18
Unknown Object (File)
Sun, Oct 26, 14:03
Unknown Object (File)
Fri, Oct 24, 14:13
Unknown Object (File)
Fri, Oct 24, 04:05
Unknown Object (File)
Thu, Oct 23, 08:33
Unknown Object (File)
Wed, Oct 22, 09: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