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
Unknown Object (File)
Tue, Nov 11, 15:24
Unknown Object (File)
Thu, Nov 6, 21:22
Unknown Object (File)
Thu, Oct 30, 03:00
Unknown Object (File)
Thu, Oct 30, 03:00
Unknown Object (File)
Thu, Oct 30, 02:54
Unknown Object (File)
Thu, Oct 30, 01:55
Unknown Object (File)
Thu, Oct 30, 01:01
Unknown Object (File)
Tue, Oct 28, 09:05
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